From 77315b21b4f4c236f2c895891ea30aaa1f79c6d7 Mon Sep 17 00:00:00 2001 From: Claire Peta Date: Thu, 15 Aug 2019 18:15:42 +1000 Subject: [PATCH] last push from class --- Assets/Prefabs/Traps/CubeWithCrystals.prefab | 2 +- Assets/Prefabs/Traps/InGroundTrap.prefab | 13 ---------- .../SinglePlayer Levels/TuteLevelOne.unity | 4 ++-- Assets/Scripts/Character.cs | 24 +++++++++---------- Assets/Scripts/Traps/CannonShot.cs | 5 ++-- Assets/Scripts/Traps/CrushingBoulder.cs | 2 -- Assets/Scripts/Traps/CubeWithCrystals.cs | 3 --- Assets/Scripts/Traps/FloatingOnWater.cs | 2 -- Assets/Scripts/Traps/Traps.cs | 6 ++--- 9 files changed, 20 insertions(+), 41 deletions(-) diff --git a/Assets/Prefabs/Traps/CubeWithCrystals.prefab b/Assets/Prefabs/Traps/CubeWithCrystals.prefab index f09eddc..270c434 100644 --- a/Assets/Prefabs/Traps/CubeWithCrystals.prefab +++ b/Assets/Prefabs/Traps/CubeWithCrystals.prefab @@ -110,7 +110,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 1a69d64be9f9e8543b4278d7f139f6f1, type: 3} m_Name: m_EditorClassIdentifier: - VisualOffset: {x: 0, y: 0, z: 0} + VisualOffset: {x: 0, y: 0.5, z: 0} is_Walkable: 1 isWater: 0 isPit: 0 diff --git a/Assets/Prefabs/Traps/InGroundTrap.prefab b/Assets/Prefabs/Traps/InGroundTrap.prefab index a22ad49..5b4086d 100644 --- a/Assets/Prefabs/Traps/InGroundTrap.prefab +++ b/Assets/Prefabs/Traps/InGroundTrap.prefab @@ -9,7 +9,6 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 3281312547625224782} - - component: {fileID: 6304764979941371139} m_Layer: 0 m_Name: InGroundTrap m_TagString: Untagged @@ -36,18 +35,6 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &6304764979941371139 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3281312547625224785} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 90d16cd20b1d52149ae6b3d4c15c79db, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1001 &1063799847781320221 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scenes/SinglePlayer Levels/TuteLevelOne.unity b/Assets/Scenes/SinglePlayer Levels/TuteLevelOne.unity index 4aea42e..3e9f598 100644 --- a/Assets/Scenes/SinglePlayer Levels/TuteLevelOne.unity +++ b/Assets/Scenes/SinglePlayer Levels/TuteLevelOne.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a0370235c2e3d814b13101554c409f0f7e5112f16a322de816c6f10e9386a82 -size 201860 +oid sha256:5cb0faa75a290c6cd189bfe71f72e626ecfe805efb476c81fe5907d4fc24962c +size 214523 diff --git a/Assets/Scripts/Character.cs b/Assets/Scripts/Character.cs index d88998c..8567458 100644 --- a/Assets/Scripts/Character.cs +++ b/Assets/Scripts/Character.cs @@ -147,11 +147,11 @@ public class Character : MonoBehaviour yield return new WaitForSeconds(0.05f); while (elapsedTime < time) { - transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); + Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - transform.position = charEndPosition; + Current.position = charEndPosition; } IEnumerator MoveConveyorBackwardCoroutine(Block Target, Transform Current, float time, float heightMax) { @@ -162,11 +162,11 @@ public class Character : MonoBehaviour yield return new WaitForSeconds(0.05f); while (elapsedTime < time) { - transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); + Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - transform.position = charEndPosition; + Current.position = charEndPosition; } IEnumerator MoveConveyorLeftCoroutine(Block Target, Transform Current, float time, float heightMax) { @@ -177,11 +177,11 @@ public class Character : MonoBehaviour yield return new WaitForSeconds(0.05f); while (elapsedTime < time) { - transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); + Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - transform.position = charEndPosition; + Current.position = charEndPosition; } IEnumerator MoveConveyorRightCoroutine(Block Target, Transform Current, float time, float heightMax) { @@ -192,11 +192,11 @@ public class Character : MonoBehaviour yield return new WaitForSeconds(0.05f); while (elapsedTime < time) { - transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); + Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time)); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - transform.position = charEndPosition; + Current.position = charEndPosition; } IEnumerator PushLeftCoroutine(Transform Current, float time) @@ -208,11 +208,11 @@ public class Character : MonoBehaviour yield return new WaitForSeconds(0.05f); while (elapsedTime < time) { - transform.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); + Current.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - transform.position = endPosition; + Current.position = endPosition; } IEnumerator PushRightCoroutine(Transform Current, float time) @@ -224,11 +224,11 @@ public class Character : MonoBehaviour yield return new WaitForSeconds(0.05f); while (elapsedTime < time) { - transform.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); + Current.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time)); yield return new WaitForEndOfFrame(); elapsedTime += Time.deltaTime; } - transform.position = endPosition; + Current.position = endPosition; } IEnumerator MoveDownCoroutine(Block Target, Transform Current, float time, float heightMax) diff --git a/Assets/Scripts/Traps/CannonShot.cs b/Assets/Scripts/Traps/CannonShot.cs index 126eae3..257f501 100644 --- a/Assets/Scripts/Traps/CannonShot.cs +++ b/Assets/Scripts/Traps/CannonShot.cs @@ -16,10 +16,10 @@ public class CannonShot : MonoBehaviour { Names.Add("Character"); rb = this.gameObject.GetComponent(); - /*for (int i = 0; i < clientData.AllClients.Count; i++) + for (int i = 0; i < clientData.AllClients.Count; i++) { Names.Add(clientData.AllClients[i].characterAnimal + "(Clone)"); - }*/ + } } IEnumerator PushLeftCoroutine(float time) @@ -38,7 +38,6 @@ public class CannonShot : MonoBehaviour transform.position = endPosition; Destroy(gameObject); } - IEnumerator PushRightCoroutine(Transform Current, float time) { float elapsedTime = 0; diff --git a/Assets/Scripts/Traps/CrushingBoulder.cs b/Assets/Scripts/Traps/CrushingBoulder.cs index 72a2916..5614944 100644 --- a/Assets/Scripts/Traps/CrushingBoulder.cs +++ b/Assets/Scripts/Traps/CrushingBoulder.cs @@ -4,7 +4,6 @@ using UnityEngine; public class CrushingBoulder : MonoBehaviour { - public bool triggeranimate; public bool triggeranimate1; @@ -16,7 +15,6 @@ public class CrushingBoulder : MonoBehaviour Animate(); triggeranimate = false; } - //for testing purposes if (triggeranimate1 == true) { returnToPosition(); diff --git a/Assets/Scripts/Traps/CubeWithCrystals.cs b/Assets/Scripts/Traps/CubeWithCrystals.cs index 0d8d00c..7c8006d 100644 --- a/Assets/Scripts/Traps/CubeWithCrystals.cs +++ b/Assets/Scripts/Traps/CubeWithCrystals.cs @@ -4,7 +4,6 @@ using UnityEngine; public class CubeWithCrystals : MonoBehaviour { - bool characterInWater = false; public GameObject crystals; public bool triggeranimate; public bool triggeranimate1; @@ -17,7 +16,6 @@ public class CubeWithCrystals : MonoBehaviour Animate(); triggeranimate = false; } - //for testing purposes if (triggeranimate1 == true) { returnToPosition(); @@ -39,7 +37,6 @@ public class CubeWithCrystals : MonoBehaviour } crystals.transform.position = endPosition; } - IEnumerator ShrinkCoroutine() { float elapsedTime = 0; diff --git a/Assets/Scripts/Traps/FloatingOnWater.cs b/Assets/Scripts/Traps/FloatingOnWater.cs index 2dd3707..f653f81 100644 --- a/Assets/Scripts/Traps/FloatingOnWater.cs +++ b/Assets/Scripts/Traps/FloatingOnWater.cs @@ -22,7 +22,6 @@ public class FloatingOnWater : MonoBehaviour Animate(); triggeranimate = false; } - //for testing purposes if (triggeranimate1 == true) { returnToPosition(); @@ -67,7 +66,6 @@ public class FloatingOnWater : MonoBehaviour player.transform.position = charEndPosition; lilypad.transform.position = endPosition; } - IEnumerator SinkCoroutine() { float elapsedTime = 0; diff --git a/Assets/Scripts/Traps/Traps.cs b/Assets/Scripts/Traps/Traps.cs index 789dbcf..02da176 100644 --- a/Assets/Scripts/Traps/Traps.cs +++ b/Assets/Scripts/Traps/Traps.cs @@ -9,7 +9,7 @@ public class Traps : MonoBehaviour public List CrushingBoulders; public List CubesWithCrystals; public List FloatingOnWater; - public List InGroundTraps; + //public List InGroundTraps; public List ShootingCannons; public void environmentTurn() @@ -30,10 +30,10 @@ public class Traps : MonoBehaviour { FloatingOnWater[d].GetComponent().Animate(); } - for (int e = 0; e < InGroundTraps.Count; e++) + /*for (int e = 0; e < InGroundTraps.Count; e++) { InGroundTraps[e].GetComponent().Animate(); - } + }*/ for (int f = 0; f < ShootingCannons.Count; f++) { ShootingCannons[f].GetComponent().Animate();