diff --git a/Assets/Chandelure.png b/Assets/Chandelure.png new file mode 100644 index 0000000..8615499 Binary files /dev/null and b/Assets/Chandelure.png differ diff --git a/Assets/Chandelure.png.meta b/Assets/Chandelure.png.meta new file mode 100644 index 0000000..113d2ba --- /dev/null +++ b/Assets/Chandelure.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 6d6e1f5b956cc13459fbcdb5b9964e40 +timeCreated: 1460419860 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + 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 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GlowScript.cs b/Assets/GlowScript.cs new file mode 100644 index 0000000..a4e6776 --- /dev/null +++ b/Assets/GlowScript.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using System.Collections; + +public class GlowScript : MonoBehaviour { + + Behaviour halo; //Access the halo effect, AKA Glowing effect + bool stepped = false; //A boolean to know if we are in contact with the object + + // Use this for initialization + void Start () { + halo = (Behaviour)GetComponent("Halo"); + halo.enabled = true; + } + + // Update is called once per frame + void Update () { + if (Input.GetKeyDown(KeyCode.E) && stepped) //If the player steps on the object and presses E, the glow will stop + { + halo.enabled = false; + } + } + + void OnTriggerEnter2D() { //When we collide with the object, stepped is true, if not false + stepped = true; + } +} diff --git a/Assets/GlowScript.cs.meta b/Assets/GlowScript.cs.meta new file mode 100644 index 0000000..e68f7df --- /dev/null +++ b/Assets/GlowScript.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 316d077642bc3154abce695ef887312c +timeCreated: 1460419928 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/NewBehaviourScript.cs b/Assets/NewBehaviourScript.cs new file mode 100644 index 0000000..291e42e --- /dev/null +++ b/Assets/NewBehaviourScript.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + +public class NewBehaviourScript : MonoBehaviour { + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/Assets/NewBehaviourScript.cs.meta b/Assets/NewBehaviourScript.cs.meta new file mode 100644 index 0000000..d7d469e --- /dev/null +++ b/Assets/NewBehaviourScript.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b99032351ab6c40448101572c5984e1b +timeCreated: 1460525073 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlatformRotation.cs b/Assets/PlatformRotation.cs new file mode 100644 index 0000000..54cb99d --- /dev/null +++ b/Assets/PlatformRotation.cs @@ -0,0 +1,43 @@ +using UnityEngine; +using System.Collections; + +public class PlatformRotation : MonoBehaviour { + + public float rotationDelay = 2f; + public float speed = 1; + public GameObject platform; + private Rigidbody2D rb2d; + private HingeJoint2D hinge; + + // Use this for initialization + void Start() { + + } + + // Update is called once per frame + void Update() { + + } + + void Awake() { + rb2d = GetComponent(); + rb2d.isKinematic = true; + hinge = GetComponent(); + JointAngleLimits2D limits = hinge.limits; + limits.min = -90; + limits.max = 90; + hinge.limits = limits; + hinge.useLimits = true; + } + + void OnCollisionEnter2D(Collision2D other) { + if (other.gameObject.CompareTag("Player")) { + Invoke("Rotate", rotationDelay); + } + } + + void Rotate() { + rb2d.isKinematic = false; + } +} + diff --git a/Assets/PlatformRotation.cs.meta b/Assets/PlatformRotation.cs.meta new file mode 100644 index 0000000..9966f96 --- /dev/null +++ b/Assets/PlatformRotation.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ede46f0f7226c9541ba00e1b079c976a +timeCreated: 1460345788 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlatformSpawner.cs b/Assets/PlatformSpawner.cs new file mode 100644 index 0000000..8b4ca61 --- /dev/null +++ b/Assets/PlatformSpawner.cs @@ -0,0 +1,68 @@ +using UnityEngine; +using System.Collections; + +public class PlatformSpawner : MonoBehaviour { + + public int maxNumberPlatforms = 4; + public GameObject platform; //A platform prefab + public GameObject platformSwitch = GameObject.Find("platformSwitch"); //A platform swtich prefab + + + public GameObject[] platformArray; //Stores each platform so we can keep track of them + public GameObject[] platformSwitchArray; //Stores each switch + + public float horizontalMin = 1f; + public float horizontalMax = -1f; + public float verticalMin = 1f; + public float verticalMax = 2f; + + private Vector2 originPosition; + + // Use this for initialization + void Start () { + platformArray = new GameObject[maxNumberPlatforms + 1]; + platformSwitchArray = new GameObject[maxNumberPlatforms + 1]; + + //platform = GameObject.Find("platform"); + //platformSwitch = GameObject.Find("platformSwitch"); + PlatformSwitchDetection detect = platformSwitch.GetComponent(); + + + for (int i = 0; i < maxNumberPlatforms + 1; i++) { + platformArray[i] = platform; + platformSwitchArray[i] = platformSwitch; + } + + originPosition = transform.position; + Instantiate(platformArray[0], originPosition, Quaternion.identity); + Vector2 switchPosition = new Vector2(originPosition.x, originPosition.y - 1); + Instantiate(platformSwitch, switchPosition, Quaternion.identity); + Spawn(); + } + + // Update is called once per frame + void Update () { + int count = 0; + for (int i = 0; i < maxNumberPlatforms + 1; i++) + { + PlatformSwitchDetection detect = platformSwitchArray[i].GetComponent(); + if (detect) { + count++; + } + } + if (count == 5) { + Instantiate(platform, new Vector2(0, 0), Quaternion.identity); + } + } + + void Spawn() { + for (int i = 1; i < maxNumberPlatforms + 1; i++) { + //Creates a new position based on the origin position using the ranges defined + Vector2 randomPosition = originPosition + new Vector2(Random.Range(horizontalMin, horizontalMax), Random.Range(verticalMin, verticalMax)); + Instantiate(platformArray[i], randomPosition, Quaternion.identity); //Spawns the platform at the randomPosition + Vector2 switchPosition = new Vector2(randomPosition.x, randomPosition.y - 1); + Instantiate(platformSwitch, switchPosition, Quaternion.identity); + originPosition = randomPosition; //Sets the originPosition to the randomPosition as reference for the next platform to spawn + } + } +} diff --git a/Assets/PlatformSpawner.cs.meta b/Assets/PlatformSpawner.cs.meta new file mode 100644 index 0000000..46bf3f7 --- /dev/null +++ b/Assets/PlatformSpawner.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 422bcea507bce2147873d813b78457d3 +timeCreated: 1460333638 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/PlatformSwitchDetection.cs b/Assets/PlatformSwitchDetection.cs new file mode 100644 index 0000000..845e83c --- /dev/null +++ b/Assets/PlatformSwitchDetection.cs @@ -0,0 +1,29 @@ +using UnityEngine; +using System.Collections; + +public class PlatformSwitchDetection : MonoBehaviour { + + public bool switchActive = false; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + if (switchActive) { + Debug.Log("WAHOOOOOOOOOOOOO"); + } + } + + void OnCollisionEnter2D(Collision2D other) { + if (other.gameObject.CompareTag("platform")) { + Activate(); + } + } + + void Activate() { + switchActive = true; + } +} diff --git a/Assets/PlatformSwitchDetection.cs.meta b/Assets/PlatformSwitchDetection.cs.meta new file mode 100644 index 0000000..c37d01c --- /dev/null +++ b/Assets/PlatformSwitchDetection.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6bb36aaaf308bd743880d81e9eed3652 +timeCreated: 1460410240 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Chandelure.prefab b/Assets/Prefabs/Chandelure.prefab new file mode 100644 index 0000000..3a2cc1c Binary files /dev/null and b/Assets/Prefabs/Chandelure.prefab differ diff --git a/Assets/Prefabs/Chandelure.prefab.meta b/Assets/Prefabs/Chandelure.prefab.meta new file mode 100644 index 0000000..8b8552f --- /dev/null +++ b/Assets/Prefabs/Chandelure.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a65e2df9aad11344972e5083e07edbe +timeCreated: 1460419873 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/PlaceholderObj/HorizontalCorridorPuzzle.prefab.meta b/Assets/Prefabs/PlaceholderObj/HorizontalCorridorPuzzle.prefab.meta index 892aec2..4530262 100644 --- a/Assets/Prefabs/PlaceholderObj/HorizontalCorridorPuzzle.prefab.meta +++ b/Assets/Prefabs/PlaceholderObj/HorizontalCorridorPuzzle.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8226cc434bbc0c34495c88b56205f186 +guid: c49f7459a27168944b1b5616a12753ff timeCreated: 1457603059 licenseType: Free NativeFormatImporter: diff --git a/Assets/Prefabs/PlaceholderObj/platform.png b/Assets/Prefabs/PlaceholderObj/platform.png new file mode 100644 index 0000000..5dcc009 Binary files /dev/null and b/Assets/Prefabs/PlaceholderObj/platform.png differ diff --git a/Assets/Prefabs/PlaceholderObj/platform.png.meta b/Assets/Prefabs/PlaceholderObj/platform.png.meta new file mode 100644 index 0000000..635c62a --- /dev/null +++ b/Assets/Prefabs/PlaceholderObj/platform.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 179d0d3fc7b3db0479bb9a742930935f +timeCreated: 1460335894 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + 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 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Wobbuffet.prefab b/Assets/Prefabs/Wobbuffet.prefab new file mode 100644 index 0000000..d9f5ee8 Binary files /dev/null and b/Assets/Prefabs/Wobbuffet.prefab differ diff --git a/Assets/Prefabs/Wobbuffet.prefab.meta b/Assets/Prefabs/Wobbuffet.prefab.meta new file mode 100644 index 0000000..ac56147 --- /dev/null +++ b/Assets/Prefabs/Wobbuffet.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 17e4312eef46f3d468c535843876acbb +timeCreated: 1460524756 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/platform.prefab b/Assets/Prefabs/platform.prefab new file mode 100644 index 0000000..52a4751 Binary files /dev/null and b/Assets/Prefabs/platform.prefab differ diff --git a/Assets/Prefabs/platform.prefab.meta b/Assets/Prefabs/platform.prefab.meta new file mode 100644 index 0000000..faa25bf --- /dev/null +++ b/Assets/Prefabs/platform.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2a359f96991db74da4a7aee453b7f8d +timeCreated: 1460336009 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/platformSwitch 1.prefab b/Assets/Prefabs/platformSwitch 1.prefab new file mode 100644 index 0000000..f37a1ac Binary files /dev/null and b/Assets/Prefabs/platformSwitch 1.prefab differ diff --git a/Assets/Prefabs/platformSwitch 1.prefab.meta b/Assets/Prefabs/platformSwitch 1.prefab.meta new file mode 100644 index 0000000..83999e8 --- /dev/null +++ b/Assets/Prefabs/platformSwitch 1.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 045964526415eec499fc7b0a1c363ae7 +timeCreated: 1460410046 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/platformSwitch.prefab b/Assets/Prefabs/platformSwitch.prefab new file mode 100644 index 0000000..9f1d546 Binary files /dev/null and b/Assets/Prefabs/platformSwitch.prefab differ diff --git a/Assets/Prefabs/platformSwitch.prefab.meta b/Assets/Prefabs/platformSwitch.prefab.meta new file mode 100644 index 0000000..5aba5c3 --- /dev/null +++ b/Assets/Prefabs/platformSwitch.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 20ff9c8d0997cbc4c8dd3a276772ef82 +timeCreated: 1460409794 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/TestScene.unity b/Assets/Scenes/TestScene.unity index 1b2c3b4..e5f0036 100644 Binary files a/Assets/Scenes/TestScene.unity and b/Assets/Scenes/TestScene.unity differ diff --git a/Assets/switch.png b/Assets/switch.png new file mode 100644 index 0000000..85848b8 Binary files /dev/null and b/Assets/switch.png differ diff --git a/Assets/switch.png.meta b/Assets/switch.png.meta new file mode 100644 index 0000000..059cbc2 --- /dev/null +++ b/Assets/switch.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 2d96446babcc69d47aad66ef3072ec23 +timeCreated: 1460409916 +licenseType: Free +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + 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 + alphaIsTransparency: 1 + textureType: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 603e796..a2e9ba0 100644 Binary files a/ProjectSettings/QualitySettings.asset and b/ProjectSettings/QualitySettings.asset differ