/// <summary> /// Handles tutorial level state changed event /// </summary> public void TutorialLevelEventHandler(TutorialLevelState tutorialLevelState) { switch (tutorialLevelState) { case TutorialLevelState.Started: // activate text TutorialLevelFirstText.enabled = true; break; case TutorialLevelState.SmallFishEaten: TutorialLevelFirstText.enabled = false; break; case TutorialLevelState.BigFishSpawned: // activate text TutorialLevelSecondText.enabled = true; break; case TutorialLevelState.MediumFish1Eaten: TutorialLevelSecondText.enabled = false; TutorialLevelThirdText.enabled = true; break; default: break; } }
/// <summary> /// Handle tutorial level events, according to which event happened previously /// </summary> public void TutorialLevelEventHandler(TutorialLevelState tutorialLevelState) { switch (tutorialLevelState) { case TutorialLevelState.SmallFishEaten: TutorialLevelEvent.Invoke(TutorialLevelState.BigFishSpawned); SpawnEnemyFish(0.1f, false, GameConstants.TUTORIAL_LEVEL_BIG_FISH_SCALE); SpawnEnemyFish(0.13f, true, GameConstants.TUTORIAL_LEVEL_MEDIUM_FISH_1_SCALE); break; case TutorialLevelState.MediumFish1Eaten: SpawnEnemyFish(0.1f, false, GameConstants.TUTORIAL_LEVEL_MEDIUM_FISH_2_SCALE); SpawnPowerUp(PowerUpType.God); break; default: break; } }