コード例 #1
0
        /// <summary>
        /// Goes to the Roulette Scene.
        /// </summary>
        /// <param name="sender">The object that sends the event</param>
        /// <param name="e">The parameters of the event.</param>
        private void OnButtonGoRouletteClicked(object sender, EventArgs e)
        {
            _soundManager.PlaySound(SimpleSoundService.SoundType.Button);

            var screenContext = new ScreenContext(new PlayRouletteScene(_numberOfPlayers));
            var transition    = new ColorFadeTransition(Color.White, TimeSpan.FromSeconds(1));

            WaveServices.ScreenContextManager.To(screenContext, transition);
        }
コード例 #2
0
        public void OpenGameOver()
        {
            //Pause back particles
            this.backScene.Pause();

            var transition = new ColorFadeTransition(Color.White, TimeSpan.FromSeconds(0.5f));

            WaveServices.ScreenContextManager.Push(new ScreenContext(new GameOverScene()), transition);
        }
コード例 #3
0
        /// <summary>
        /// Goes Back to the Main Menu Scene.
        /// </summary>
        /// <param name="sender">The object that sends the event</param>
        /// <param name="e">The parameters of the event.</param>
        private void OnButtonBackClicked(object sender, EventArgs e)
        {
            _soundManager.StopAllSounds();
            _soundManager.PlaySound(SimpleSoundService.SoundType.Back);

            var screenContext = new ScreenContext(new MainMenuScene(), new PlayersPopupScene(), new RulesScene());
            var transition    = new ColorFadeTransition(Color.White, TimeSpan.FromSeconds(1));

            WaveServices.ScreenContextManager.To(screenContext, transition);
        }
コード例 #4
0
        public void GameOver()
        {
            this.blockBuilder.IsActive         = false;
            this.blockBuilder.OnCollision     -= OnCollision;
            this.blockBuilder.OnStarCollected -= OnStarCollected;

            //Pause back particles
            this.backScene.Pause();


            var transition = new ColorFadeTransition(Color.White, TimeSpan.FromSeconds(0.5f));

            WaveServices.ScreenContextManager.Push(new ScreenContext(new GameOverScene()), transition);
        }