Added score system and updated shanking with more angles!
This commit is contained in:
parent
5bebe754ce
commit
8cc0583a85
8 changed files with 126 additions and 29 deletions
|
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue