private void Update() { Player = GameManager.Instance.Player; switch (currentState) { case STATES.STATE_HERO: if (!HeroInstanciate) { HeroTutorial.SetActive(true); HeroHUD.SetActive(true); HeroCamScript.inst.SwitchView(); HeroInstanciate = true; HeroInstructions[0].SetActive(true); } if (Welcome) { HeroInstructions[0].SetActive(false); HeroInstructions[1].SetActive(true); MechanicsList.SetActive(true); Welcome = false; } else if (Camera) { HeroInstructions[1].SetActive(false); HeroInstructions[2].SetActive(true); Mechanics[1].SetActive(true); Camera = false; } else if (Movement) { HeroInstructions[2].SetActive(false); Movement = false; } if (RedSpawn.GetComponent <TutSpawnRed>().Battle) { if (GameObject.FindGameObjectsWithTag("Minion").Length <= 1) { RedSpawn.GetComponent <TutSpawnRed>().Battle = false; End.SetActive(true); Ending.SetActive(true); } } break; case STATES.STATE_MINION: if (SpawnMinionTutRed) { RedSpawns = MinionRedSpawns; SpawnRedStrikerMinion(); SpawnRedStrikerMinion(); SpawnRedTankMinion(); SpawnRedTankMinion(); SpawnRedTankMinion(); SpawnRedStrikerMinion(); SpawnRedStrikerMinion(); SpawnRedStrikerMinion(); SpawnMinionTutRed = false; } if (SpawnMinionTutBlue) { SpawnBlueStrikerMinion(); SpawnBlueStrikerMinion(); SpawnBlueStrikerMinion(); SpawnBlueTankMinion(); SpawnBlueTankMinion(); SpawnBlueCasterMinion(); SpawnMinionTutBlue = false; } if (Input.GetKeyDown(KeyCode.C) && !firstswitch) { MoveMainCam.SetActive(true); firstswitch = true; } if (RedTower && !RedTower.activeInHierarchy) { TogglePause(); MinionEnd.SetActive(true); } break; default: break; } if (!PlayedIntro) { if (Input.GetKeyDown(KeyCode.Return)) { PlayedIntro = true; IntroSequence.SetActive(false); currentState = STATES.STATE_HERO; } } if (Input.GetKeyDown(KeyCode.Backspace)) { SpawnRedTankMinion(); SpawnRedCasterMinion(); SpawnRedStrikerMinion(); } if (Player && !Player.activeInHierarchy) { Death.SetActive(true); } }