diff --git a/playable/Assets/Materials/No Name.mat b/playable/Assets/Materials/No Name.mat index f28865c..04c5c4d 100644 Binary files a/playable/Assets/Materials/No Name.mat and b/playable/Assets/Materials/No Name.mat differ diff --git a/playable/Assets/Music/SynauliaDraft2.mp3.mp3 b/playable/Assets/Music/SynauliaDraft2.mp3.mp3 new file mode 100644 index 0000000..5be0b6e Binary files /dev/null and b/playable/Assets/Music/SynauliaDraft2.mp3.mp3 differ diff --git a/playable/Assets/Music/SynauliaDraft2.mp3.mp3.meta b/playable/Assets/Music/SynauliaDraft2.mp3.mp3.meta new file mode 100644 index 0000000..2733e2c --- /dev/null +++ b/playable/Assets/Music/SynauliaDraft2.mp3.mp3.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c2a624d18c7389b40bdba4fe7c83acb8 +AudioImporter: + serializedVersion: 4 + format: 0 + quality: .5 + stream: 1 + 3D: 0 + forceToMono: 0 + useHardware: 0 + loopable: 0 + userData: diff --git a/playable/Assets/Objects/Heart.png b/playable/Assets/Objects/Heart.png index 57b7dfa..adf2d0b 100644 Binary files a/playable/Assets/Objects/Heart.png and b/playable/Assets/Objects/Heart.png differ diff --git a/playable/Assets/Prefabs/GameStuff.prefab b/playable/Assets/Prefabs/GameStuff.prefab index e047e03..26490f5 100644 Binary files a/playable/Assets/Prefabs/GameStuff.prefab and b/playable/Assets/Prefabs/GameStuff.prefab differ diff --git a/playable/Assets/Scenes/Level1.unity b/playable/Assets/Scenes/Level1.unity index b5c3acc..ca928a4 100644 Binary files a/playable/Assets/Scenes/Level1.unity and b/playable/Assets/Scenes/Level1.unity differ diff --git a/playable/Assets/Scenes/Level2.unity b/playable/Assets/Scenes/Level2.unity index e69d69b..e146da9 100644 Binary files a/playable/Assets/Scenes/Level2.unity and b/playable/Assets/Scenes/Level2.unity differ diff --git a/playable/Assets/Scripts/playerController.cs b/playable/Assets/Scripts/playerController.cs index 7f6d107..4fa1461 100644 --- a/playable/Assets/Scripts/playerController.cs +++ b/playable/Assets/Scripts/playerController.cs @@ -18,8 +18,9 @@ public class playerController : MonoBehaviour { public GameObject scoreDisplay; public GUIText gameOverDisplay; public GameObject dashDisplay; - public GameObject playerFrac; + //public GameObject playerFrac; public GameObject[] hearts; + public Color playerColor; //public GameObject heart2; //public GameObject heart3; @@ -65,6 +66,7 @@ public class playerController : MonoBehaviour { private float volume = 1.0f; private bool exploded = false; + private bool failCheck = false; @@ -93,6 +95,10 @@ public class playerController : MonoBehaviour { gameOverDisplay.enabled = true; gameOverDisplay.text = ""+ gameObject.name + " Wins"; Time.timeScale = 0; + if (Input.anyKeyDown){ + Time.timeScale = 1.0f; + Application.LoadLevel("Menu_Scene"); + } } @@ -165,7 +171,7 @@ public class playerController : MonoBehaviour { hearts[i].GetComponent().color = Color.black; } - else hearts[i].GetComponent().color = Color.red; + else hearts[i].GetComponent().color = playerColor; }//end for displayedHealth = health; @@ -190,20 +196,28 @@ public class playerController : MonoBehaviour { if (heartTimer >=2.5f){ health = 2; } - if (!exploded){ + /*if (!exploded){ exploded = true; Vector3 fracRotation = transform.rotation.eulerAngles; fracRotation.y +=90; GameObject explosion = Instantiate (playerFrac, transform.position+(Vector3.up*-3), Quaternion.Euler(fracRotation)) as GameObject; - } + }*/ } if (deathTimer > 0) { deathTimer -= Time.deltaTime; if (!droppedCandy) { + if (!failCheck){ Instantiate (newCandy, transform.position + Vector3.up, transform.rotation); Debug.Log ("Exploded position: " + transform.position); + } + else { + Vector3 randCandyPos = new Vector3 (Random.Range (-20.0f, 20.0f),Random.Range (-11.0f, 14.0f),0); + Instantiate (newCandy, randCandyPos, transform.rotation); + failCheck = false; + + } droppedCandy = true; } @@ -339,8 +353,13 @@ public class playerController : MonoBehaviour { } if (col.collider.tag == "failBox") { + failCheck = true; health = 0; + if (score > 0) + scoreDisplay.GetComponent().text = "score: " + score.ToString (); + + } }