private void Update() { foreach (ForceRespawn other in otherRespawnAreas) { for (int h = 0; h < monsters.Length; h++) { if (allowTurnOff[h] && other.LeaveRespawnTextOn(h)) { allowTurnOff[h] = false; } } } for (int i = 0; i < monsters.Length; i++) { if (monsters[i] == null) { if (allowTurnOff[i]) { respawnAlly[i].SetActive(false); } interacts[i] = ""; } else { respawnAlly[i].SetActive(true); if (Input.GetButtonDown(interacts[i])) { totem.ForcedGenEnemy(); for (int j = 0; j < monsters.Length; j++) { respawnAlly[i].SetActive(false); interacts[j] = ""; monsters[j] = null; } } } } }