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(); } } }