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

@ -3,13 +3,24 @@ using System.Collections;
public class Patron : MonoBehaviour {
void OnTriggerEnter(Collider other) {
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) {
//Instantiate(explosion, transform.position, transform.rotation);
if (other.tag == "Shank")
{
//Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
Destroy(gameObject);
gameController.DetractScore ();
}
}
}