public override void Enter() { base.Enter(); if (Cmd is RTCommand) { RTCommand ev = Cmd as RTCommand; Owner.OnPursue(ev); } }
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); } }
//寻路至 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); }
//追赶 public virtual void OnPursue(RTCommand ev) { this.mActorPathFinding.SetOnFinished(ev.Callback); MoveTo(ev.DestPosition); this.mActorAction.Play("run", null, true); }
protected virtual ECommandReply CheckRunTo(RTCommand cmd) { this.GetActorAI().AIMode = EAIMode.Auto; SendStateMessage(FSMState.FSM_RUN, cmd); return(ECommandReply.Y);; }