internal StoryboardTransition(StoryboardScreen screen, float fadeAlphaStep, float brightenAlphaStep)
        {
            this.fadeAlphaStep = fadeAlphaStep;
            this.brightenAlphaStep = brightenAlphaStep;
            this.currentAlphaValue = 1.0f;
            this.currentProgress = ScreenTransitionProgess.Fading;
            this.screen = screen;

            alphaEffect = ScreenManager.Instance.Content.Load<Effect>("System\\Effects\\SetAlphaValue");
        }
 public void OnSpriteCollision(ISpriteCollideable objectCollidedWith)
 {
     if (objectCollidedWith == World.Player)
     {
         if (!playerColliding)
         {
             playerColliding = true;
             StoryboardScreen sbs = new StoryboardScreen("Test", "Game", @"StoryboardXML\TitleScreenStoryboard");
             ScreenManager.Instance.ScreenList.Add(sbs);
             ScreenTransition st = new ScreenTransition("Game", "Test", 0.2f, 0.2f, false, false);
             ScreenManager.Instance.Transition(st);
             World.Paused = true;
             World.RemoveWorldObject(this);
         }
     }
 }
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            fullScreenSettings = new ResolutionSettings(320, 240, this.GraphicsDevice.DisplayMode.Width, this.GraphicsDevice.DisplayMode.Height, true);

            //Initialization Logic

            // Set our XNA content directory
            Content.RootDirectory = "Content";

            // create our services
            CreateServices();
            #if !XBOX
            // create our screens
            Screen editorScreen = new EditorScreen(this, EditorScreen.ScreenName);
            this.screenList.Add(editorScreen);
            #endif
            Screen gameScreen = new GameScreen(this, GameScreen.ScreenName);
            this.screenList.Add(gameScreen);

            Screen titleScreen = new StoryboardScreen("TitleScreen", "Introduction", @"StoryboardXML\TitleScreenStoryboard");
            this.screenList.Add(titleScreen);

            Screen introScreen = new StoryboardScreen("Introduction", "Game", @"StoryboardXML\IntroductionStoryboard");
            this.screenList.Add(introScreen);

            Screen midpoint = new StoryboardScreen("MidPoint", "Game", @"StoryboardXML\MidPointStoryboard");
            this.screenList.Add(midpoint);

            Screen endScreen = new StoryboardScreen("Ending", "Game", @"StoryboardXML\EndingStoryboard");
            this.screenList.Add(endScreen);

            this.AddScreenToDisplay(titleScreen);

            resolutionService = new ScreenResolutionService(graphics, ScreenManager.WindowedSettings);
            this.Services.AddService(typeof(IScreenResolutionService), resolutionService);

            sb = new SpriteBatch(GraphicsDevice);

            //For profiling:
            /*
            this.IsFixedTimeStep = false;
            graphics.SynchronizeWithVerticalRetrace = false;
            graphics.ApplyChanges();
            */

            // Initialize all components
            base.Initialize();
        }