Esempio n. 1
0
        protected override void OnEntered(object enterInformation)
        {
            Game.Cursor.IsActive    = false;
            _gameSession            = (GameSession)enterInformation;
            _stateChangeInformation = StateChangeInformation.Empty;

            //todo: reactivate 3d
            //var rendererType = Settings.Default.GameMode == "3D" ? GameRendererType.ThreeDe : GameRendererType.TwoDe;
            _gameRenderer = GameRendererFactory.CreateGameRenderer(GameRendererType.TwoDe, Game, _gameSession.CurrentLevel);

            _finishSlideAnimator = new Animator();
            _finishSlideAnimator.AddAnimation("RotateText", new DeltaAnimation(1.0f, RotateAndSetAlphaText, false));
            _finishSlideAnimator.AddAnimation("Wait", new WaitAnimation(1.5f));
            _finishSlideAnimator.AddTransition("RotateText", "Wait");
            _finishSlideAnimator.AnimationFinished += OnFinishSlideFinished;

            _finishedSprite = new Sprite(Game.Content.Load <Texture2D>("textures/headings"))
            {
                Position = new Vector2(Game.ScreenWidth * 0.5f, Game.ScreenHeight * 0.5f),
                Alpha    = 0.0f
            };
        }