diff --git a/playable/Assets/Lachlan_jump_work.unity b/playable/Assets/Lachlan_jump_work.unity index 087aa14..4d95a2e 100644 Binary files a/playable/Assets/Lachlan_jump_work.unity and b/playable/Assets/Lachlan_jump_work.unity differ diff --git a/playable/Assets/Scripts/playerController.cs b/playable/Assets/Scripts/playerController.cs index 007a78e..38b7f0b 100644 --- a/playable/Assets/Scripts/playerController.cs +++ b/playable/Assets/Scripts/playerController.cs @@ -14,6 +14,7 @@ public class playerController : MonoBehaviour { public GameObject newCandy; public stickController stick; //controller for stick public GUIText scoreDisplay; + public GUIText gameOverDisplay; public float runSpeed; //run speed public float jumpHeight; //jump height @@ -51,6 +52,15 @@ public class playerController : MonoBehaviour { death (); applyPlayerDirection (Input.GetAxisRaw (HorizontalBtn)); damage (); + if (transform.position.y < -3) + health = 0; + + if (score >= 10) { + gameOverDisplay.enabled = true; + gameOverDisplay.text = ""+ gameObject.name + " Wins"; + + } + } void FixedUpdate() {