示例#1
0
        public override void LeaveState()
        {
            base.LeaveState();

            abilitiesKit = null;
            abilitiesPlaque.MenuDestroy();
            abilitiesPlaque = null;

            movementKit = null;
            movementPlaque.MenuDestroy();
            movementPlaque = null;

            creditsKit = null;
            creditsPlaque.MenuDestroy();
            creditsPlaque = null;

            backButtonKit = null;
            backButton.MenuDestroy();
            backButton = null;
        }
示例#2
0
        public override void EnterState()
        {
            base.EnterState();

            abilitiesKit = new AssetKit_Rules_Abilities();
            abilitiesPlaque = new UIElement_StaticMenuElement(mGameReference.aaDisplay, mGameReference.aaGameWorld, abilitiesKit.ASSET_NAME, 450, 311, (int)abilitiesKit.ORIGIN.X, (int)abilitiesKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, abilitiesKit.SRC_RECTX, abilitiesKit.SRC_RECTY, abilitiesKit.SRC_RECTWIDTH, abilitiesKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(abilitiesPlaque);

            movementKit = new AssetKit_Rules_Movement();
            movementPlaque = new UIElement_StaticMenuElement(mGameReference.aaDisplay, mGameReference.aaGameWorld, movementKit.ASSET_NAME, 450, 50, (int)movementKit.ORIGIN.X, (int)movementKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, movementKit.SRC_RECTX, movementKit.SRC_RECTY, movementKit.SRC_RECTWIDTH, movementKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(movementPlaque);

            pickupsKit = new AssetKit_Rules_PickUps();
            pickupsPlaque = new UIElement_StaticMenuElement(mGameReference.aaDisplay, mGameReference.aaGameWorld, pickupsKit.ASSET_NAME, 850, 50, (int)pickupsKit.ORIGIN.X, (int)pickupsKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, pickupsKit.SRC_RECTX, pickupsKit.SRC_RECTY, pickupsKit.SRC_RECTWIDTH, pickupsKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(pickupsPlaque);

            creditsKit = new AssetKit_CreditsPlaque();
            creditsPlaque = new UIElement_StaticMenuElement(mGameReference.aaDisplay, mGameReference.aaGameWorld, creditsKit.ASSET_NAME, 50, 50, (int)creditsKit.ORIGIN.X, (int)creditsKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, creditsKit.SRC_RECTX, creditsKit.SRC_RECTY, creditsKit.SRC_RECTWIDTH, creditsKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(creditsPlaque);

            backButtonKit = new AssetKit_Menu_BackButton();
            backButton = new UIElement_MenuButton(mGameReference.aaDisplay, mGameReference.aaGameWorld, backButtonKit.ASSET_NAME, 15, 625, (int)backButtonKit.ORIGIN.X, (int)backButtonKit.ORIGIN.Y, Constants.LAYER_ENTITY_DEPTH, backButtonKit.SRC_RECTX, backButtonKit.SRC_RECTY, backButtonKit.SRC_RECTWIDTH, backButtonKit.SRC_RECTHEIGHT, 0.0f);
            mGameReference.aaDisplay.AddMenuUIElement(backButton);
        }