Example #1
0
    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();
            }
        }
    }
Example #2
0
 public void updataState(IActorAction action)
 {
     if(action.actiontype != EFSMAction.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();
         }
     }
 }
Example #3
0
 public void updataState(EFSMAction eAction)
 {
     IActorAction action = new IActorAction(eAction);
     updataState(action);
 }
Example #4
0
 public void AddAction(IActorAction a)
 {
     actions.Add(a);
 }