示例#1
0
文件: IActor.cs 项目: hihijack/ASN
    public void updataState(IActorAction action)
    {
        if (action.actiontype != EActorAction.NONE)
        {
//            Debug.Log("updataState - " + this.state + " by action:" + action.actiontype);//########
            IActorState asCur  = this.state;
            IActorState asNext = asCur.toNextState(action.actiontype);
            if (asNext != null)
            {
                this.state  = asNext;
                this.action = action;
                this.state.OnEnter();
            }
        }
    }