FSMState.DoBeforeEntering C# (CSharp) Method

DoBeforeEntering() public method

public DoBeforeEntering ( ) : void
return void
    public virtual void DoBeforeEntering()
    {
    }

Usage Example

Example #1
0
    public void PerformTransition(Transition trans)
    {
        if (trans == Transition.Null)
        {
            Debug.LogWarning("trans为null无法发生转换"); return;
        }
        StateID id = FSMstate.GetStateID(trans);

        if (id == StateID.Null)
        {
            Debug.LogWarning("id为null,无法发生转换"); return;
        }
        if (StateDic.ContainsKey(id))
        {
            FSMState state = StateDic[id];
            FSMstate.DoAfterLeaving();
            FSMstate = state;
            stateId  = id;
            FSMstate.DoBeforeEntering();
        }
        else
        {
            Debug.LogWarning("要转换的" + id + "不存在");
        }
    }
All Usage Examples Of FSMState::DoBeforeEntering