Example #1
0
        private IEnumerator StartGame(FightInfo fightInfo)
        {
            StatesUtility.ClearOptionLayer();
            yield return(ApplyFightInfos(fightInfo));

            yield return(m_ui.GotoVersusAnim());

            yield return((object)new WaitForTime(2f));

            StateLayer   defaultLayer = StateManager.GetDefaultLayer();
            StateContext currentState = defaultLayer.GetChildState();

            if (currentState != null)
            {
                defaultLayer.ClearChildState(0);
                while ((int)currentState.get_loadState() == 8)
                {
                    yield return(null);
                }
            }
            FightState fightState = new FightState(fightInfo);

            defaultLayer.SetChildState(fightState, 0);
            VersusState versusState = new VersusState(m_ui, fightState);

            this.SetChildState(versusState, 0);
        }
Example #2
0
        private void OpenState(StateContext state)
        {
            m_havreMap.SetInteractable(value: false);
            StateLayer val  = default(StateLayer);
            StateLayer val2 = default(StateLayer);

            if (StateManager.TryGetLayer("OptionUI", ref val) && val.HasChildState() && val.GetChildState().HasChildState())
            {
                m_havreMap.SetInteractable(value: true);
            }
            else if (StateManager.TryGetLayer("PlayerUI", ref val2))
            {
                if (val2.HasChildState() && val2.GetChildState().HasChildState())
                {
                    m_havreMap.SetInteractable(value: true);
                    return;
                }
                StateManager.SetActiveInputLayer(val2);
                val2.GetChainEnd().SetChildState(state, 0);
            }
        }