Implement all levels.

This commit is contained in:
Emil Shanaty
2025-04-28 00:42:18 +03:00
parent bf8b7c5457
commit 2540fd9800
9 changed files with 549 additions and 119 deletions
+7 -1
View File
@@ -7,6 +7,8 @@ public class LevelManager : MonoBehaviour
{
[SerializeField] private List<GameObject> enemiesList;
public UnityEvent onLevelComplete;
public UnityEvent levelCompleteCondition;
// Start is called before the first frame update
void Start()
{
@@ -16,13 +18,17 @@ public class LevelManager : MonoBehaviour
// Update is called once per frame
void Update()
{
levelCompleteCondition?.Invoke();
}
public void CheckIfNoEnemies()
{
if (enemiesList.Count == 0)
{
LevelFinishEvent();
}
}
public void AddEnemyToList(GameObject enemy)
{
enemiesList.Add(enemy);