UI_Manager ist funktionstüchtig // Prefab UI_Manager erstellt

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

View File

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