예제 #1
0
    public void Awake()
    {
        OnEntityRespawn.AddListener(SetSpawn);

        for (int i = 0; i < spawnAreas.Length; i++)
        {
            spawnAreas[i].isOccupied = false;
        }
    }
예제 #2
0
 protected override void Awake()
 {
     base.Awake();
     enemiesInArea = new List <Enemy>(EnemyDatabase.Instance.GetAvailableEnemiesForThisArea(id));
     spawnables    = new List <Spawnable>(EnemyDatabase.Instance.GetAvailableSpawnablesForThisArea(id));
     delaySpawning = true;
     Invoke(nameof(StartSpawning), 2);
     spawnEvent.AddListener(this);
 }
예제 #3
0
 public void AddSpawnEvent(UnityAction listener)
 {
     spawnEvent.AddListener(listener);
 }