示例#1
0
 public override void Enter()
 {
     base.Enter();
     if (Cmd is RTCommand)
     {
         RTCommand ev = Cmd as RTCommand;
         Owner.OnPursue(ev);
     }
 }
示例#2
0
 public override void Enter()
 {
     base.Enter();
     if (Cmd is RTCommand)
     {
         RTCommand ev = Cmd as RTCommand;
         Owner.OnPursue(ev);
     }
     else
     {
         MVCommand ev = Cmd as MVCommand;
         Owner.OnForceToMove(ev);
     }
 }
示例#3
0
 //寻路至
 protected virtual ECommandReply CheckRunTo(RTCommand cmd)
 {
     //if (CannotControlSelf())
     //{
     //    return ECommandReply.N;
     //}
     //if (FSM == FSMState.FSM_SKILL)
     //{
     //    return ECommandReply.N;
     //}
     //if (GetAIFeature(EAIFeatureType.CAN_MOVE) == false)
     //{
     //    return ECommandReply.N;
     //}
     //if (mVehicle.GetActorPathFinding().CanReachPosition(cmd.DestPosition) == false)
     //{
     //    ShowWarning("300001");
     //    return ECommandReply.N;
     //}
     this.GetActorAI().AIMode = EAIMode.Auto;
     SendStateMessage(FSMState.FSM_RUN, cmd);
     return(ECommandReply.Y);
 }
示例#4
0
 //追赶
 public virtual void OnPursue(RTCommand ev)
 {
     this.mActorPathFinding.SetOnFinished(ev.Callback);
     MoveTo(ev.DestPosition);
     this.mActorAction.Play("run", null, true);
 }
示例#5
0
 protected virtual ECommandReply CheckRunTo(RTCommand cmd)
 {
     this.GetActorAI().AIMode = EAIMode.Auto;
     SendStateMessage(FSMState.FSM_RUN, cmd);
     return(ECommandReply.Y);;
 }