Exemplo n.º 1
0
        public override void LeaveState()
        {
            base.LeaveState();

            titleKit = null;
            gameTitle.MenuDestroy();
            gameTitle = null;

            startKit = null;
            startButton.MenuDestroy();
            startButton = null;

            instructionKit = null;
            instructionButton.MenuDestroy();
            instructionButton = null;

            scoresKit = null;
            scoresButton.MenuDestroy();
            scoresKit = null;

            quitKit = null;
            quitButton.MenuDestroy();
            quitButton = null;
        }
Exemplo n.º 2
0
        public override void EnterState()
        {
            base.EnterState();

            //Music plug
            mGameReference.mMusicGameplay_Instance.Stop();
            mGameReference.mMusicMenu_Instance.Play();

            titleKit = new AssetKit_Menu_Title();
            gameTitle = new UIElement_StaticMenuElement(mGameReference.aaDisplay, mGameReference.aaGameWorld, titleKit.ASSET_NAME, 640, 180, (int)titleKit.ORIGIN.X, (int)titleKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, titleKit.SRC_RECTX, titleKit.SRC_RECTY, titleKit.SRC_RECTWIDTH, titleKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(gameTitle);

            startKit = new AssetKit_Menu_Button_StartGame();
            startButton = new UIElement_MenuButton(mGameReference.aaDisplay, mGameReference.aaGameWorld, startKit.ASSET_NAME, 540, 260, (int)startKit.ORIGIN.X, (int)startKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, startKit.SRC_RECTX, startKit.SRC_RECTY, startKit.SRC_RECTWIDTH, startKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(startButton);

            instructionKit = new AssetKit_Menu_Button_Instructions();
            instructionButton = new UIElement_MenuButton(mGameReference.aaDisplay, mGameReference.aaGameWorld, instructionKit.ASSET_NAME, 540, 350, (int)instructionKit.ORIGIN.X, (int)instructionKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, instructionKit.SRC_RECTX, instructionKit.SRC_RECTY, instructionKit.SRC_RECTWIDTH, instructionKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(instructionButton);

            scoresKit = new AssetKit_Menu_Button_Scores();
            scoresButton = new UIElement_MenuButton(mGameReference.aaDisplay, mGameReference.aaGameWorld, scoresKit.ASSET_NAME, 540, 440, (int)scoresKit.ORIGIN.X, (int)scoresKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, scoresKit.SRC_RECTX, scoresKit.SRC_RECTY, scoresKit.SRC_RECTWIDTH, scoresKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(scoresButton);

            quitKit = new AssetKit_Menu_Button_Quit();
            quitButton = new UIElement_MenuButton(mGameReference.aaDisplay, mGameReference.aaGameWorld, quitKit.ASSET_NAME, 540, 530, (int)quitKit.ORIGIN.X, (int)quitKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, quitKit.SRC_RECTX, quitKit.SRC_RECTY, quitKit.SRC_RECTWIDTH, quitKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(quitButton);
        }