示例#1
0
        public override void Create()
        {
            Pax4UiState state = null;

            state = new Pax4UiStateLavaAndIceChooseQuest("chooseQuest", this);
            AddUiState(state);

            Enter(state);

            state = new Pax4UiStateLavaAndIceChooseMissionPrologue("Prologue", this);
            AddUiState(state);

            //state = new Pax4UiStateLavaAndIceChooseMissionEquilibrium("Equilibrium", this);
            //AddState(state);

            //state = new Pax4UiStateLavaAndIceChooseMissionEquilibrium("LavaGrail", this);
            //AddState(state);

            //state = new Pax4UiStateLavaAndIceChooseMissionEquilibrium("IceGrail", this);
            //AddState(state);

            //state = new Pax4UiStateLavaAndIceChooseMissionEquilibrium("Dragons", this);
            //AddState(state);

            state = new Pax4UiStateLavaAndIceInstructions("instructions", null);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceMissionDifficulty("difficulty", this);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceMenu("menu", this);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceVictory("victory", this);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceDefeat("defeat", this);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceMission("fgLava", this, Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceMission("fgIce", this, Pax4WorldLavaAndIce.ELavaAndIceMissionType._ICE);
            AddUiState(state);

            state = new Pax4UiStateLavaAndIceMission("fgLavaAndIce", this, Pax4WorldLavaAndIce.ELavaAndIceMissionType._LAVA_AND_ICE);
            AddUiState(state);
        }
示例#2
0
文件: Pax4Ui.cs 项目: pax7/LavaAndIce
        public void Enter(Pax4UiState p_uiState = null)
        {
            if (p_uiState == null)
            {
                return;
            }

            if (p_uiState._persistent)
            {
                for (int i = 0; i < _currentUiState.Count; i++)
                {
                    _currentUiState[i].Exit();
                    _previousUiState.Add(_currentUiState[i]);
                    _uiRemove.Add(_currentUiState[i]);
                }
            }
            else
            {
                _previousUiState.Add(p_uiState);
                p_uiState.Enter();

                return;
            }

            if (_uiRemove.Count > 0)
            {
                for (int i = 0; i < _uiRemove.Count; i++)
                {
                    _currentUiState.Remove(_uiRemove[i]);
                }
                _uiRemove.Clear();
            }

            _currentUiState.Add(p_uiState);
            p_uiState.Enter();
        }
示例#3
0
文件: Pax4Ui.cs 项目: pax7/LavaAndIce
 public void AddUiState(Pax4UiState p_uiState)
 {
     AddChild(p_uiState);
 }