diff --git a/IronToad_UnityProject/Assets/Sound.meta b/IronToad_UnityProject/Assets/Art/Models/Materials/textures.meta similarity index 57% rename from IronToad_UnityProject/Assets/Sound.meta rename to IronToad_UnityProject/Assets/Art/Models/Materials/textures.meta index 359da3b..d893680 100644 --- a/IronToad_UnityProject/Assets/Sound.meta +++ b/IronToad_UnityProject/Assets/Art/Models/Materials/textures.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 0fbabcae9313543ffbf1429aeac3664d +guid: 09711520b5e786041b9ba22371e0234d folderAsset: yes -timeCreated: 1485006712 -licenseType: Free +timeCreated: 1485010695 +licenseType: Pro DefaultImporter: userData: assetBundleName: diff --git a/IronToad_UnityProject/Assets/Art/Models/Materials/textures/spotlight-sprite.png b/IronToad_UnityProject/Assets/Art/Models/Materials/textures/spotlight-sprite.png new file mode 100644 index 0000000..f1ea550 Binary files /dev/null and b/IronToad_UnityProject/Assets/Art/Models/Materials/textures/spotlight-sprite.png differ diff --git a/IronToad_UnityProject/Assets/Art/Models/Materials/textures/spotlight-sprite.png.meta b/IronToad_UnityProject/Assets/Art/Models/Materials/textures/spotlight-sprite.png.meta new file mode 100644 index 0000000..71b68af --- /dev/null +++ b/IronToad_UnityProject/Assets/Art/Models/Materials/textures/spotlight-sprite.png.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 468f554d4b2714881b3a3531f1208ab2 +timeCreated: 1485008431 +licenseType: Pro +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + - buildTarget: Standalone + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Art/Models/lightHouse_LOW.obj.meta b/IronToad_UnityProject/Assets/Art/Models/lightHouse_LOW.obj.meta new file mode 100644 index 0000000..d94fc60 --- /dev/null +++ b/IronToad_UnityProject/Assets/Art/Models/lightHouse_LOW.obj.meta @@ -0,0 +1,82 @@ +fileFormatVersion: 2 +guid: 919eb0dba9aa0da44aec3a80f1cf98ea +timeCreated: 1485000000 +licenseType: Free +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: lighthouse + 100002: //RootNode + 400000: lighthouse + 400002: //RootNode + 2300000: lighthouse + 3300000: lighthouse + 4300000: lighthouse + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + serializedVersion: 2 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Prefabs/Spotlight.prefab b/IronToad_UnityProject/Assets/Prefabs/Spotlight.prefab new file mode 100644 index 0000000..81738e2 Binary files /dev/null and b/IronToad_UnityProject/Assets/Prefabs/Spotlight.prefab differ diff --git a/IronToad_UnityProject/Assets/Prefabs/Spotlight.prefab.meta b/IronToad_UnityProject/Assets/Prefabs/Spotlight.prefab.meta new file mode 100644 index 0000000..eb87b60 --- /dev/null +++ b/IronToad_UnityProject/Assets/Prefabs/Spotlight.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0d81d1b6be27a45b9a4e899d392721f4 +timeCreated: 1485010473 +licenseType: Pro +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Scripts/Searchlight.cs b/IronToad_UnityProject/Assets/Scripts/Searchlight.cs index 02acfca..f113fae 100644 --- a/IronToad_UnityProject/Assets/Scripts/Searchlight.cs +++ b/IronToad_UnityProject/Assets/Scripts/Searchlight.cs @@ -46,6 +46,8 @@ public class Searchlight : MonoBehaviour void OnTriggerEnter(Collider other) { + if (other.tag != "Player") + return; chased = other; isTriggering = true; if (state != SearchState.Chasing) @@ -59,6 +61,8 @@ public class Searchlight : MonoBehaviour void OnTriggerExit(Collider other) { + if (other.tag != "Player") + return; isTriggering = false; if (state == SearchState.Chasing && !isTriggeringAtLeastOne()) { @@ -97,13 +101,13 @@ public class Searchlight : MonoBehaviour else { LeanTween.delayedCall(gameObject, timeBetweenChase, ()=>{ - Vector3 start = transform.localPosition; - Vector3 end = chased.transform.localPosition + Vector3 start = transform.position; + Vector3 end = chased.transform.position + Vector3.right * Random.Range(-randomFactor, randomFactor) + Vector3.forward * Random.Range(-randomFactor, randomFactor); float distance = (end - start).magnitude; LeanTween.value(gameObject, 0f, 1f, distance / speed + timePadding).setOnUpdate((float val)=>{ - transform.localPosition = start + (end-start)*val; + transform.position = start + (end-start)*val; }).setEase(animationCurve).setOnComplete(chase); }); } diff --git a/IronToad_UnityProject/Assets/Standard Assets/Utility.meta b/IronToad_UnityProject/Assets/Standard Assets/Utility.meta new file mode 100644 index 0000000..17922e6 --- /dev/null +++ b/IronToad_UnityProject/Assets/Standard Assets/Utility.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4539eb30e895bbb41b5eae6df2dde978 +folderAsset: yes +timeCreated: 1436977288 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/IronToad_UnityProject/Assets/Standard Assets/Utility/SmoothFollow.cs b/IronToad_UnityProject/Assets/Standard Assets/Utility/SmoothFollow.cs new file mode 100644 index 0000000..01881dc --- /dev/null +++ b/IronToad_UnityProject/Assets/Standard Assets/Utility/SmoothFollow.cs @@ -0,0 +1,61 @@ +using UnityEngine; + +namespace UnityStandardAssets.Utility +{ + public class SmoothFollow : MonoBehaviour + { + + // The target we are following + [SerializeField] + private Transform target; + // The distance in the x-z plane to the target + [SerializeField] + private float distance = 10.0f; + // the height we want the camera to be above the target + [SerializeField] + private float height = 5.0f; + + [SerializeField] + private float rotationDamping; + [SerializeField] + private float heightDamping; + + // Use this for initialization + void Start() { } + + // Update is called once per frame + void LateUpdate() + { + // Early out if we don't have a target + if (!target) + return; + + // Calculate the current rotation angles + var wantedRotationAngle = target.eulerAngles.y; + var wantedHeight = target.position.y + height; + + var currentRotationAngle = transform.eulerAngles.y; + var currentHeight = transform.position.y; + + // Damp the rotation around the y-axis + currentRotationAngle = Mathf.LerpAngle(currentRotationAngle, wantedRotationAngle, rotationDamping * Time.deltaTime); + + // Damp the height + currentHeight = Mathf.Lerp(currentHeight, wantedHeight, heightDamping * Time.deltaTime); + + // Convert the angle into a rotation + var currentRotation = Quaternion.Euler(0, currentRotationAngle, 0); + + // Set the position of the camera on the x-z plane to: + // distance meters behind the target + transform.position = target.position; + transform.position -= currentRotation * Vector3.forward * distance; + + // Set the height of the camera + transform.position = new Vector3(transform.position.x ,currentHeight , transform.position.z); + + // Always look at the target + transform.LookAt(target); + } + } +} \ No newline at end of file diff --git a/IronToad_UnityProject/Assets/Standard Assets/Utility/SmoothFollow.cs.meta b/IronToad_UnityProject/Assets/Standard Assets/Utility/SmoothFollow.cs.meta new file mode 100644 index 0000000..8e0ee92 --- /dev/null +++ b/IronToad_UnityProject/Assets/Standard Assets/Utility/SmoothFollow.cs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f76806479d916a64aa03f8e3eba7912f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: diff --git a/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity b/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity index e4a6330..5338a13 100644 Binary files a/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity and b/IronToad_UnityProject/Assets/_Scenes/GreyBox_Prototype.unity differ