Browse Source

last push from class

Josh_Dev_branch
Claire Peta 5 years ago
parent
commit
77315b21b4
9 changed files with 20 additions and 41 deletions
  1. +1
    -1
      Assets/Prefabs/Traps/CubeWithCrystals.prefab
  2. +0
    -13
      Assets/Prefabs/Traps/InGroundTrap.prefab
  3. +2
    -2
      Assets/Scenes/SinglePlayer Levels/TuteLevelOne.unity
  4. +12
    -12
      Assets/Scripts/Character.cs
  5. +2
    -3
      Assets/Scripts/Traps/CannonShot.cs
  6. +0
    -2
      Assets/Scripts/Traps/CrushingBoulder.cs
  7. +0
    -3
      Assets/Scripts/Traps/CubeWithCrystals.cs
  8. +0
    -2
      Assets/Scripts/Traps/FloatingOnWater.cs
  9. +3
    -3
      Assets/Scripts/Traps/Traps.cs

+ 1
- 1
Assets/Prefabs/Traps/CubeWithCrystals.prefab View File

@ -110,7 +110,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1a69d64be9f9e8543b4278d7f139f6f1, type: 3} m_Script: {fileID: 11500000, guid: 1a69d64be9f9e8543b4278d7f139f6f1, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
VisualOffset: {x: 0, y: 0, z: 0}
VisualOffset: {x: 0, y: 0.5, z: 0}
is_Walkable: 1 is_Walkable: 1
isWater: 0 isWater: 0
isPit: 0 isPit: 0

+ 0
- 13
Assets/Prefabs/Traps/InGroundTrap.prefab View File

@ -9,7 +9,6 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 3281312547625224782} - component: {fileID: 3281312547625224782}
- component: {fileID: 6304764979941371139}
m_Layer: 0 m_Layer: 0
m_Name: InGroundTrap m_Name: InGroundTrap
m_TagString: Untagged m_TagString: Untagged
@ -36,18 +35,6 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 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 --- !u!1001 &1063799847781320221
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

+ 2
- 2
Assets/Scenes/SinglePlayer Levels/TuteLevelOne.unity View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:9a0370235c2e3d814b13101554c409f0f7e5112f16a322de816c6f10e9386a82
size 201860
oid sha256:5cb0faa75a290c6cd189bfe71f72e626ecfe805efb476c81fe5907d4fc24962c
size 214523

+ 12
- 12
Assets/Scripts/Character.cs View File

@ -147,11 +147,11 @@ public class Character : MonoBehaviour
yield return new WaitForSeconds(0.05f); yield return new WaitForSeconds(0.05f);
while (elapsedTime < time) while (elapsedTime < time)
{ {
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
elapsedTime += Time.deltaTime; elapsedTime += Time.deltaTime;
} }
transform.position = charEndPosition;
Current.position = charEndPosition;
} }
IEnumerator MoveConveyorBackwardCoroutine(Block Target, Transform Current, float time, float heightMax) IEnumerator MoveConveyorBackwardCoroutine(Block Target, Transform Current, float time, float heightMax)
{ {
@ -162,11 +162,11 @@ public class Character : MonoBehaviour
yield return new WaitForSeconds(0.05f); yield return new WaitForSeconds(0.05f);
while (elapsedTime < time) while (elapsedTime < time)
{ {
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
elapsedTime += Time.deltaTime; elapsedTime += Time.deltaTime;
} }
transform.position = charEndPosition;
Current.position = charEndPosition;
} }
IEnumerator MoveConveyorLeftCoroutine(Block Target, Transform Current, float time, float heightMax) IEnumerator MoveConveyorLeftCoroutine(Block Target, Transform Current, float time, float heightMax)
{ {
@ -177,11 +177,11 @@ public class Character : MonoBehaviour
yield return new WaitForSeconds(0.05f); yield return new WaitForSeconds(0.05f);
while (elapsedTime < time) while (elapsedTime < time)
{ {
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
elapsedTime += Time.deltaTime; elapsedTime += Time.deltaTime;
} }
transform.position = charEndPosition;
Current.position = charEndPosition;
} }
IEnumerator MoveConveyorRightCoroutine(Block Target, Transform Current, float time, float heightMax) IEnumerator MoveConveyorRightCoroutine(Block Target, Transform Current, float time, float heightMax)
{ {
@ -192,11 +192,11 @@ public class Character : MonoBehaviour
yield return new WaitForSeconds(0.05f); yield return new WaitForSeconds(0.05f);
while (elapsedTime < time) while (elapsedTime < time)
{ {
transform.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
Current.position = Vector3.Lerp(startPosition, charEndPosition, (elapsedTime / time));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
elapsedTime += Time.deltaTime; elapsedTime += Time.deltaTime;
} }
transform.position = charEndPosition;
Current.position = charEndPosition;
} }
IEnumerator PushLeftCoroutine(Transform Current, float time) IEnumerator PushLeftCoroutine(Transform Current, float time)
@ -208,11 +208,11 @@ public class Character : MonoBehaviour
yield return new WaitForSeconds(0.05f); yield return new WaitForSeconds(0.05f);
while (elapsedTime < time) while (elapsedTime < time)
{ {
transform.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time));
Current.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
elapsedTime += Time.deltaTime; elapsedTime += Time.deltaTime;
} }
transform.position = endPosition;
Current.position = endPosition;
} }
IEnumerator PushRightCoroutine(Transform Current, float time) IEnumerator PushRightCoroutine(Transform Current, float time)
@ -224,11 +224,11 @@ public class Character : MonoBehaviour
yield return new WaitForSeconds(0.05f); yield return new WaitForSeconds(0.05f);
while (elapsedTime < time) while (elapsedTime < time)
{ {
transform.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time));
Current.position = Vector3.Lerp(startPosition, endPosition, (elapsedTime / time));
yield return new WaitForEndOfFrame(); yield return new WaitForEndOfFrame();
elapsedTime += Time.deltaTime; elapsedTime += Time.deltaTime;
} }
transform.position = endPosition;
Current.position = endPosition;
} }
IEnumerator MoveDownCoroutine(Block Target, Transform Current, float time, float heightMax) IEnumerator MoveDownCoroutine(Block Target, Transform Current, float time, float heightMax)

+ 2
- 3
Assets/Scripts/Traps/CannonShot.cs View File

@ -16,10 +16,10 @@ public class CannonShot : MonoBehaviour
{ {
Names.Add("Character"); Names.Add("Character");
rb = this.gameObject.GetComponent<Rigidbody>(); rb = this.gameObject.GetComponent<Rigidbody>();
/*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)"); Names.Add(clientData.AllClients[i].characterAnimal + "(Clone)");
}*/
}
} }
IEnumerator PushLeftCoroutine(float time) IEnumerator PushLeftCoroutine(float time)
@ -38,7 +38,6 @@ public class CannonShot : MonoBehaviour
transform.position = endPosition; transform.position = endPosition;
Destroy(gameObject); Destroy(gameObject);
} }
IEnumerator PushRightCoroutine(Transform Current, float time) IEnumerator PushRightCoroutine(Transform Current, float time)
{ {
float elapsedTime = 0; float elapsedTime = 0;

+ 0
- 2
Assets/Scripts/Traps/CrushingBoulder.cs View File

@ -4,7 +4,6 @@ using UnityEngine;
public class CrushingBoulder : MonoBehaviour public class CrushingBoulder : MonoBehaviour
{ {
public bool triggeranimate; public bool triggeranimate;
public bool triggeranimate1; public bool triggeranimate1;
@ -16,7 +15,6 @@ public class CrushingBoulder : MonoBehaviour
Animate(); Animate();
triggeranimate = false; triggeranimate = false;
} }
//for testing purposes
if (triggeranimate1 == true) if (triggeranimate1 == true)
{ {
returnToPosition(); returnToPosition();

+ 0
- 3
Assets/Scripts/Traps/CubeWithCrystals.cs View File

@ -4,7 +4,6 @@ using UnityEngine;
public class CubeWithCrystals : MonoBehaviour public class CubeWithCrystals : MonoBehaviour
{ {
bool characterInWater = false;
public GameObject crystals; public GameObject crystals;
public bool triggeranimate; public bool triggeranimate;
public bool triggeranimate1; public bool triggeranimate1;
@ -17,7 +16,6 @@ public class CubeWithCrystals : MonoBehaviour
Animate(); Animate();
triggeranimate = false; triggeranimate = false;
} }
//for testing purposes
if (triggeranimate1 == true) if (triggeranimate1 == true)
{ {
returnToPosition(); returnToPosition();
@ -39,7 +37,6 @@ public class CubeWithCrystals : MonoBehaviour
} }
crystals.transform.position = endPosition; crystals.transform.position = endPosition;
} }
IEnumerator ShrinkCoroutine() IEnumerator ShrinkCoroutine()
{ {
float elapsedTime = 0; float elapsedTime = 0;

+ 0
- 2
Assets/Scripts/Traps/FloatingOnWater.cs View File

@ -22,7 +22,6 @@ public class FloatingOnWater : MonoBehaviour
Animate(); Animate();
triggeranimate = false; triggeranimate = false;
} }
//for testing purposes
if (triggeranimate1 == true) if (triggeranimate1 == true)
{ {
returnToPosition(); returnToPosition();
@ -67,7 +66,6 @@ public class FloatingOnWater : MonoBehaviour
player.transform.position = charEndPosition; player.transform.position = charEndPosition;
lilypad.transform.position = endPosition; lilypad.transform.position = endPosition;
} }
IEnumerator SinkCoroutine() IEnumerator SinkCoroutine()
{ {
float elapsedTime = 0; float elapsedTime = 0;

+ 3
- 3
Assets/Scripts/Traps/Traps.cs View File

@ -9,7 +9,7 @@ public class Traps : MonoBehaviour
public List<CrushingBoulder> CrushingBoulders; public List<CrushingBoulder> CrushingBoulders;
public List<CubeWithCrystals> CubesWithCrystals; public List<CubeWithCrystals> CubesWithCrystals;
public List<FloatingOnWater> FloatingOnWater; public List<FloatingOnWater> FloatingOnWater;
public List<InGroundTrap> InGroundTraps;
//public List<InGroundTrap> InGroundTraps;
public List<ShootingCannon> ShootingCannons; public List<ShootingCannon> ShootingCannons;
public void environmentTurn() public void environmentTurn()
@ -30,10 +30,10 @@ public class Traps : MonoBehaviour
{ {
FloatingOnWater[d].GetComponent<FloatingOnWater>().Animate(); FloatingOnWater[d].GetComponent<FloatingOnWater>().Animate();
} }
for (int e = 0; e < InGroundTraps.Count; e++)
/*for (int e = 0; e < InGroundTraps.Count; e++)
{ {
InGroundTraps[e].GetComponent<InGroundTrap>().Animate(); InGroundTraps[e].GetComponent<InGroundTrap>().Animate();
}
}*/
for (int f = 0; f < ShootingCannons.Count; f++) for (int f = 0; f < ShootingCannons.Count; f++)
{ {
ShootingCannons[f].GetComponent<ShootingCannon>().Animate(); ShootingCannons[f].GetComponent<ShootingCannon>().Animate();

Loading…
Cancel
Save