UI_Manager ist funktionstüchtig // Prefab UI_Manager erstellt

This commit is contained in:
pbg2h23akl committed 2024-07-01 10:35:55 +02:00
1 parent bb603fa798
commit 6bb0bc1c39
7 files changed
+880 -315

No files matched your search

@@ -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);
}
}