Exemplo n.º 1
0
        public override void Update(GameTime time)
        {
            if (intro != null)
            {
                intro.Update(time);
                if (intro.IsOver)
                {
                    intro.Dispose();
                    intro = null;
                }
            }
            else
            {
                if (nextScreen != null)
                {
                    overlayAlpha += time.ElapsedGameTimeSeconds * 9.0f;
                    if (overlayAlpha > 1)
                    {
                        CurrentScreen = nextScreen;
                        nextScreen    = null;
                        overlayAlpha  = 1;
                    }
                }
                else
                {
                    overlayAlpha -= time.ElapsedGameTimeSeconds * 9.0f;
                    if (overlayAlpha < 0)
                    {
                        overlayAlpha = 0;
                    }
                }

                loadingOverlay.Update(time);
                if (!game.IsIngame)
                {
                    //UpdateScene(time);
                    if (currentScreen != null && dummyScreen != currentScreen)
                    {
                        currentScreen.Update(time);
                    }
                    else
                    {
                        mainMenu.Update(time);
                    }
                }
                else
                {
                    if (game.CurrentGame.IsOver)
                    {
                        //ShowScore(game.CurrentGame.ResultScore);
                        game.Back();
                    }
                }
            }
        }
Exemplo n.º 2
0
        //public Texture Earth
        //{
        //    get { return renderTarget.GetColorBufferTexture(); }
        //}

        public Menu(Code2015 game, RenderSystem rs)
        {
            this.game     = game;
            this.mainMenu = new MainMenu(game, this);
            //this.sideSelect = new SelectScreen(game, this);
            //this.renderSys = rs;

            //CreateScene(rs);
            //this.loadScreen = new LoadingScreen(this, rs);
            this.intro       = new Intro(rs);
            this.credits     = new CreditScreen(rs, this);
            this.tutorial    = new Tutorial(this);
            this.dummyScreen = new DummyScreen();

            FileLocation fl = FileSystem.Instance.Locate("bg_black.tex", GameFileLocs.GUI);

            overlay34           = UITextureManager.Instance.CreateInstance(fl);
            this.loadingOverlay = new LoadingOverlay(game, overlay34);


            //fl = FileSystem.Instance.Locate("mm_logo.tex", GameFileLocs.GUI);
        }
Exemplo n.º 3
0
        public override void Update(GameTime time)
        {
            if (intro != null)
            {
                intro.Update(time);
                if (intro.IsOver)
                {
                    intro.Dispose();
                    intro = null;
                }
            }
            else
            {

                if (nextScreen != null)
                {
                    overlayAlpha += time.ElapsedGameTimeSeconds * 9.0f;
                    if (overlayAlpha > 1)
                    {
                        CurrentScreen = nextScreen;
                        nextScreen = null;
                        overlayAlpha = 1;
                    }
                }
                else 
                {
                    overlayAlpha -= time.ElapsedGameTimeSeconds * 9.0f;
                    if (overlayAlpha < 0)
                        overlayAlpha = 0;

                }
                
                loadingOverlay.Update(time);
                if (!game.IsIngame)
                {
                    //UpdateScene(time);
                    if (currentScreen != null && dummyScreen != currentScreen)
                    {
                        currentScreen.Update(time);
                    }
                    else
                    {
                        mainMenu.Update(time);
                    }
                }
                else
                {
                    if (game.CurrentGame.IsOver)
                    {
                        //ShowScore(game.CurrentGame.ResultScore);
                        game.Back();
                    }
                }
            }
        }
Exemplo n.º 4
0
        //public Texture Earth
        //{
        //    get { return renderTarget.GetColorBufferTexture(); }
        //}

        public Menu(Code2015 game, RenderSystem rs)
        {
            this.game = game;
            this.mainMenu = new MainMenu(game, this);
            //this.sideSelect = new SelectScreen(game, this);
            //this.renderSys = rs;

            //CreateScene(rs);
            //this.loadScreen = new LoadingScreen(this, rs);
            this.intro = new Intro(rs);
            this.credits = new CreditScreen(rs, this);
            this.tutorial = new Tutorial(this);
            this.dummyScreen = new DummyScreen();

            FileLocation fl = FileSystem.Instance.Locate("bg_black.tex", GameFileLocs.GUI);
            overlay34 = UITextureManager.Instance.CreateInstance(fl);
            this.loadingOverlay = new LoadingOverlay(game, overlay34);


            //fl = FileSystem.Instance.Locate("mm_logo.tex", GameFileLocs.GUI);


        }