コード例 #1
0
        public void Update(float frameTime)
        {
            this.mSkyMgr.Update();
            if (this.mStateMgr.Controller.WasKeyPressed(MOIS.KeyCode.KC_B) && this.mStateMgr.MainState.User.SelectedBlock != null)
            {
                if (ed == null)
                {
                    this.save();
                    ed = new Game.GUIs.Edit(this.mStateMgr, this.mStateMgr.StoryInfo.name, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\SkyLands\\" + this.mStateMgr.StoryInfo.scenario + "\\", this.mStateMgr.MainState.User.SelectedBlockPos);
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(true);
                }
                else
                {
                    ed = null;
                    Game.BaseApp.GUI.Visible = false;
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(false);
                }
            }

            if (this.mStateMgr.Controller.WasKeyPressed(MOIS.KeyCode.KC_J))
            {
                if (sm == null)
                {
                    this.save();
                    sm = new Game.GUIs.StructuresMenu(this.mStateMgr, this.mStateMgr.StoryInfo.scenario);
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(true);
                }
                else
                {
                    sm = null;
                    Game.BaseApp.GUI.Visible = false;
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(false);
                }
            }
        }
コード例 #2
0
        public void Update(float frameTime)
        {
            this.mSkyMgr.Update();
            if(this.mStateMgr.Controller.WasKeyPressed(MOIS.KeyCode.KC_B)  && this.mStateMgr.MainState.User.SelectedBlock != null) {
                if(ed == null) {
                    this.save();
                    ed = new Game.GUIs.Edit(this.mStateMgr, this.mStateMgr.StoryInfo.name, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\SkyLands\\" + this.mStateMgr.StoryInfo.scenario + "\\", this.mStateMgr.MainState.User.SelectedBlockPos);
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(true);
                } else {
                    ed = null;
                    Game.BaseApp.GUI.Visible = false;
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(false);
                }
            }

            if(this.mStateMgr.Controller.WasKeyPressed(MOIS.KeyCode.KC_J)) {
                if(sm == null) {
                    this.save();
                    sm = new Game.GUIs.StructuresMenu(this.mStateMgr, this.mStateMgr.StoryInfo.scenario);
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(true);
                } else {
                    sm = null;
                    Game.BaseApp.GUI.Visible = false;
                    this.mStateMgr.MainState.User.SwitchGUIVisibility(false);
                }
            }
        }