void StoryScreen_FadeOutStory(TowerScreen.FadeOutMode mode) { i1.Visible = false; this.FadeIn(); this.FadeOutComplete -= StoryScreen_FadeOutStory; this.FadeOutComplete += StoryScreen_FadeOutToGame; }
public void InitializeToScreen(TowerScreen screen) { _atomNameText = screen.AddText(string.Empty); _atomValenceText = screen.AddText(string.Empty); _atomElectronegativityText = screen.AddText(string.Empty); _atomDescription = screen.AddText(string.Empty); _background = screen.AddSprite("Content/message-panel.png"); _atomNameText.Y = 70; _atomValenceText.Y = _atomNameText.Y; _atomElectronegativityText.Y = _atomNameText.Y; _atomDescription.Y = _atomNameText.Y - 20; _atomNameText.Scale = 18; _atomValenceText.Scale = 18; _atomElectronegativityText.Scale = 18; _atomDescription.Scale = 18; _atomNameText.HorizontalAlignment = FlatRedBall.Graphics.HorizontalAlignment.Left; _atomNameText.X = -175; _atomDescription.HorizontalAlignment = FlatRedBall.Graphics.HorizontalAlignment.Left; _atomDescription.X = _atomNameText.X; _atomDescription.VerticalAlignment = FlatRedBall.Graphics.VerticalAlignment.Top; _atomElectronegativityText.HorizontalAlignment = FlatRedBall.Graphics.HorizontalAlignment.Right; _atomElectronegativityText.X = (this._background.Texture.Width / 2) - 25; // Climb on top of everything this._background.Z = 1; this._atomDescription.Z = 2; this._atomElectronegativityText.Z = 2; this._atomNameText.Z = 2; this._atomValenceText.Z = 2; this.Hide(); }
void SplashScreen_FadeOutComplete(TowerScreen.FadeOutMode mode) { MoveToScreen(typeof(MainMenuScreen)); }
void SplashScreen_FadeInComplete(TowerScreen.FadeOutMode mode) { this._splashTimer.Start(); }
void MainMenuScreen_FadeOutComplete_NewGame(TowerScreen.FadeOutMode mode) { if (Model.CoreModel.Instance.CurrentLevel == 1) { MoveToScreen(typeof(StoryScreen)); } else { MoveToScreen(typeof(CoreGameScreen)); } }
void MainMenuScreen_FadeOutComplete_LevelSelect(TowerScreen.FadeOutMode mode) { MoveToScreen(typeof(LevelSelectScreen)); }
void MainMenuScreen_FadeOutComplete_CreditsSelect(TowerScreen.FadeOutMode mode) { MoveToScreen(typeof(CreditsScreen)); }
void StoryScreen_FadeOutToGame(TowerScreen.FadeOutMode mode) { MoveToScreen(typeof(CoreGameScreen)); }
void LevelSelectScreen_FadeOutComplete(TowerScreen.FadeOutMode mode) { MoveToScreen(typeof(CoreGameScreen)); }
void CoreGameScreen_ReturnToMainMenuFadeInComplete(TowerScreen.FadeOutMode mode) { MoveToScreen(typeof(MainMenuScreen)); }
void CoreGameScreen_MoveToMainMenuFadeOutComplete(TowerScreen.FadeOutMode mode) { // Move blackout back to the top this.GetTopZValueAndMoveFadeToTop(); MoveToScreen(typeof(MainMenuScreen)); }
void CoreGameScreen_LevelCompleteBlackOutComplete(TowerScreen.FadeOutMode mode) { TowerText levelUp = new TowerText(this.AddText(string.Format("Level complete! on to level {0} ...", model.CurrentLevel + 1))); levelUp.AddShadow(); levelUp.AlphaRate = -0.25f; levelUp.Scale = 44; this._reactionText.Add(levelUp.BaseText); this._reactionText.Add(levelUp.EffectText); // Detect game completion if (model.CurrentLevel == CoreModel.FIRST_PUZZLE_LEVEL - 1 && model.GameState != CoreModel.GameStates.GameComplete) { // Completed normal mode. Woohoo! AudioManager.Instance.PlaySound(CoreModel.SOUND_FILE_PATH + "machine-powers-down.mp3"); this.FadeInComplete -= CoreGameScreen_LevelCompleteBlackOutComplete; this.FadeOutComplete += new FadeEventDelegate(CoreGameScreen_MoveToMainMenuFadeOutComplete); _gameComplete = this.AddSprite("Content/Story/story-mode-complete.jpg"); _gameComplete.Z = this.GetTopZValueAndMoveFadeToTop() + 1; model.SetGameStateToGameComplete(); model.FeatManager.GrantFeat(@"mrv9c_D9NCZXnKzNUMCIXP-cqZI4ZzWld6CXZjHLeEZAKLKnvoBxsxxuUJ98xtzenJJTB8nLzXF3nwTMTMXnetEQxDDu_H53A_AB1SzZaEp8v6cc4fPfSqYUnCJ4u1T6"); } if (model.CurrentLevel == CoreModel.LAST_PUZZLE_LEVEL && model.GameState != CoreModel.GameStates.GameComplete) { // Completed puzzle mode. Woohoo! AudioManager.Instance.PlaySound(CoreModel.SOUND_FILE_PATH + "machine-powers-down.mp3"); this.FadeInComplete -= CoreGameScreen_LevelCompleteBlackOutComplete; this.FadeOutComplete += new FadeEventDelegate(CoreGameScreen_MoveToMainMenuFadeOutComplete); _gameComplete = this.AddSprite("Content/Story/game-complete.jpg"); _gameComplete.Z = this.GetTopZValueAndMoveFadeToTop() + 1; model.FeatManager.GrantFeat(@"nS9N7CWfMXA3GNRjT8Wf868wqK6MT_s7k5iS7h8txeeLl6TRTOvKcRAuobehkekHGLWXafTNAgcstbvcPamDnRHiKpBuG0H2YXANVGCE6GsajGep4tJ2SONyeVWGNLCa"); model.SetGameStateToGameComplete(); } else { // Regular mode. Not Avalanche or Trickle. model.MoveToNextLevel(); performPerLevelPreSetup(); performPerLevelPostSetup(); this.FadeIn(); } model.SaveLevelReached(); }