public virtual void Initialize()
        {
            missionHelper = new MissionHelper(Game, this);
            missionHelper.Initialize();

            objectives            = new List <Objective>();
            objectiveDescriptions = new List <string>();

            rewardItems = new List <Item>();

            OverviewMenuState = Game.stateManager.planetState.SubStateManager.OverviewMenuState;
            MissionMenuState  = Game.stateManager.planetState.SubStateManager.MissionMenuState;
            RumorsMenuState   = Game.stateManager.planetState.SubStateManager.RumorsMenuState;
            ShopMenuState     = Game.stateManager.planetState.SubStateManager.ShopMenuState;

            eventBuffer    = MissionManager.MissionEventBuffer;
            responseBuffer = MissionManager.MissionResponseBuffer;
            acceptText     = new string[1];

            LoadMissionData();

            SetMissionType();
        }
Beispiel #2
0
        public virtual void Initialize()
        {
            textBoxes        = new List <TextBox>();
            tempTextList     = new List <string>();
            tempVariableList = new List <string>();

            portraitTextRectangle = new Rectangle((int)(Game1.ScreenSize.X / 2 - PortraitOverlaySize.X / 2 + PortraitTextOffset.X),
                                                  (int)(Game1.ScreenSize.Y / 2 - PortraitOverlaySize.Y / 2 + PortraitTextOffset.Y),
                                                  (int)(PortraitOverlaySize.X - PortraitTextOffset.X - 20),
                                                  (int)(PortraitOverlaySize.Y / 2 - PortraitTextOffset.Y - 20));

            normalTextRectangle = new Rectangle((int)(Game1.ScreenSize.X / 2 - TextOverlaySize.X / 2 + NormalTextOffset.X),
                                                (int)(Game1.ScreenSize.Y / 2 - TextOverlaySize.Y / 2 + NormalTextOffset.Y),
                                                (int)(TextOverlaySize.X - NormalTextOffset.X - 20),
                                                (int)(TextOverlaySize.Y / 2 - NormalTextOffset.Y - 20));

            responseTextRectangle = new Rectangle((int)(Game1.ScreenSize.X / 2 - ResponseOverlaySize.X / 2 + ResponseTextOffset.X),
                                                  (int)(Game1.ScreenSize.Y / 2 - ResponseOverlaySize.Y / 2 + ResponseTextOffset.Y),
                                                  (int)(ResponseOverlaySize.X - ResponseTextOffset.X - 20),
                                                  (int)(ResponseOverlaySize.Y / 2 - ResponseTextOffset.Y - 20));

            responseRectangles = new List <Rectangle>();

            responseRectangle1 = new Rectangle((Game1.ScreenSize.X / 2 + (int)ResponseOverlaySize.X / 6) - 10,
                                               Game1.ScreenSize.Y / 2 + 30,
                                               (int)ResponseOverlaySize.X - 20,
                                               10);

            responseRectangles.Add(responseRectangle1);

            responseRectangle2 = new Rectangle((Game1.ScreenSize.X / 2 + (int)ResponseOverlaySize.X / 6) - 10,
                                               Game1.ScreenSize.Y / 2 + 30 + 24,
                                               (int)ResponseOverlaySize.X - 20,
                                               10);

            responseRectangles.Add(responseRectangle2);

            responseRectangle3 = new Rectangle((Game1.ScreenSize.X / 2 + (int)ResponseOverlaySize.X / 6) - 10,
                                               Game1.ScreenSize.Y / 2 + 30 + 48,
                                               (int)ResponseOverlaySize.X - 20,
                                               10);

            responseRectangles.Add(responseRectangle3);

            responseRectangle4 = new Rectangle((Game1.ScreenSize.X / 2 + (int)ResponseOverlaySize.X / 6) - 10,
                                               Game1.ScreenSize.Y / 2 + 30 + 72,
                                               (int)ResponseOverlaySize.X - 20,
                                               10);

            responseRectangles.Add(responseRectangle4);

            allButtons      = new List <MenuDisplayObject>();
            buttonsToRemove = new List <MenuDisplayObject>();

            menuStates = new List <MenuState>();

            rumorsMenuState = new RumorsMenuState(this.Game, "Rumors", this, baseState);
            rumorsMenuState.Initialize();

            overviewMenuState = new OverviewMenuState(this.Game, "Overview", this, baseState);
            overviewMenuState.Initialize();

            missionMenuState = new MissionMenuState(this.Game, "Mission", this, baseState);
            missionMenuState.Initialize();

            shopMenuState = new ShopMenuState(this.Game, "Shop", this, baseState);
            shopMenuState.Initialize();

            menuStates.Add(overviewMenuState);
            menuStates.Add(missionMenuState);
            menuStates.Add(shopMenuState);
            menuStates.Add(rumorsMenuState);
        }