Browse Source

Fix bugs:

added endscreen
coloured hearts
fix hearts
removed explosion
fix L1 hitboxes
fixed falling off map
fixed p3 dash L1
fixed dash bar p1 L1
master
Joshua Reason 9 years ago
parent
commit
cf90d272bb
9 changed files with 35 additions and 4 deletions
  1. BIN
      playable/Assets/Materials/No Name.mat
  2. BIN
      playable/Assets/Music/SynauliaDraft2.mp3.mp3
  3. +12
    -0
      playable/Assets/Music/SynauliaDraft2.mp3.mp3.meta
  4. BIN
      playable/Assets/Objects/Heart.png
  5. BIN
      playable/Assets/Prefabs/GameStuff.prefab
  6. BIN
      playable/Assets/Scenes/Level1.unity
  7. BIN
      playable/Assets/Scenes/Level2.unity
  8. BIN
      playable/Assets/Scenes/Menu_Scene.unity
  9. +23
    -4
      playable/Assets/Scripts/playerController.cs

BIN
playable/Assets/Materials/No Name.mat View File


BIN
playable/Assets/Music/SynauliaDraft2.mp3.mp3 View File


+ 12
- 0
playable/Assets/Music/SynauliaDraft2.mp3.mp3.meta View File

@ -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:

BIN
playable/Assets/Objects/Heart.png View File

Before After
Width: 23  |  Height: 24  |  Size: 1.1 KiB Width: 23  |  Height: 24  |  Size: 1.1 KiB

BIN
playable/Assets/Prefabs/GameStuff.prefab View File


BIN
playable/Assets/Scenes/Level1.unity View File


BIN
playable/Assets/Scenes/Level2.unity View File


BIN
playable/Assets/Scenes/Menu_Scene.unity View File


+ 23
- 4
playable/Assets/Scripts/playerController.cs View File

@ -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<Image>().color = Color.black;
}
else hearts[i].GetComponent<Image>().color = Color.red;
else hearts[i].GetComponent<Image>().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>().text = "score: " + score.ToString ();
}
}

Loading…
Cancel
Save