Added score system and updated shanking with more angles!

This commit is contained in:
shakurass 2014-04-27 15:50:32 -06:00
commit 8cc0583a85
8 changed files with 126 additions and 29 deletions

View file

@ -4,6 +4,16 @@ using System.Collections;
public class Demon : MonoBehaviour {
public Renderer characterSprite;
private GameController gameController;
void Start() {
GameObject gameControllerObject = GameObject.FindWithTag("GameController");
if (gameControllerObject != null)
gameController = gameControllerObject.GetComponent <GameController> ();
else
Debug.Log("Cannot find GameController script.");
}
void OnTriggerEnter(Collider other) {
@ -12,6 +22,7 @@ public class Demon : MonoBehaviour {
{
//Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
Destroy(gameObject);
gameController.AddScore();
}
if (other.tag == "VVAura") {