private IEnumerator SpawnSlimes() { while (isAlive) { Debug.Log("SPAWN SLIMES!"); if (room.enemiesAlive < 3) { Debug.Log("SPAWN SLIMES < 3"); yield return(StartCoroutine(EnemiesManager.SpawnEnemy(room, slime, slimeSpawnAnimator, 4))); room.EnemiesWakeUp(); } Debug.Log("WAITFORSEC"); yield return(new WaitForSeconds(timeToSpawnSlime)); Debug.Log("Waited 15"); } }
// Start is called before the first frame update public override void OnInspectorGUI() { base.OnInspectorGUI(); if (GUILayout.Button("Kill Enemies")) { for (int i = room.Enemies.Count - 1; i >= 0; i--) { room.Enemies[i].TakeDamage(10000); } } if (GUILayout.Button("Teleport Player")) { GameManager.instance.TeleportPlayer(room); } _choiceIndex = EditorGUILayout.Popup(_choiceIndex, _choicesNames); if (GUILayout.Button("Spawn Enemy")) { EnemiesManager.SpawnEnemy(room, _choices[_choiceIndex]); } }