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
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue