UI_Manager ist funktionstüchtig // Prefab UI_Manager erstellt
This commit is contained in:
@@ -5,6 +5,7 @@ using UnityEngine;
|
||||
|
||||
public class Enemy : MonoBehaviour
|
||||
{
|
||||
private int score = 1;
|
||||
private bool alive = true;
|
||||
public DataEnemy dataEnemy;
|
||||
|
||||
@@ -19,6 +20,8 @@ public class Enemy : MonoBehaviour
|
||||
|
||||
public void checkAlive(bool alive){
|
||||
if(!alive){
|
||||
UI_Manager uI_Manager = GameObject.FindGameObjectWithTag("Manager").GetComponent<UI_Manager>();
|
||||
uI_Manager.killCount(score);
|
||||
GameObject.Destroy(this.gameObject);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user