//强制移动 protected virtual ECommandReply CheckMoveTo(MVCommand cmd) { //if (CannotControlSelf()) //{ // return ECommandReply.N; //} if (FSM == FSMState.FSM_SKILL) { return(ECommandReply.N); } //if (GetAIFeature(EAIFeatureType.CAN_MOVE) == false) //{ // return ECommandReply.N; //} //if (this is ActorPlayer) //{ // this.GetActorAI().AIMode = EAIMode.Hand; // SendStateMessage(FSMState.FSM_RUN, cmd); // return ECommandReply.Y; //} //return ECommandReply.N; //Debug.LogError("开始移动"); SendStateMessage(FSMState.FSM_RUN, cmd); return(ECommandReply.Y); }
public void OnForceToMove(MVCommand ev) { Vector2 delta = ev.Delta; this.CacheTransform.LookAt(new Vector3(this.CacheTransform.position.x + delta.x, this.CacheTransform.position.y, this.CacheTransform.position.z + delta.y)); mCharacter.SimpleMove(mCharacter.transform.forward * speed); this.mActorAction.Play("run", null, true); }
public virtual void OnForceToMove(MVCommand ev) { StopPathFinding(); Vector2 delta = ev.Delta; CacheTransform.LookAt(new Vector3(CacheTransform.position.x + delta.x, CacheTransform.position.y, CacheTransform.position.z + delta.y)); mCharacter.SimpleMove(mCharacter.transform.forward * mCurrAttr.Speed); this.mActorAction.Play("Walk", null, true); }
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); } }
public override void Enter() { base.Enter(); MVCommand ev = Cmd as MVCommand; if (ev != null) { Owner.OnForceToMove(ev); } else { Owner.OnWalk(); } }
/// <summary> /// Set initial values to the Model properties, /// since they will be binded to the UI the idea is to show /// an initial text in the TextBox. /// </summary> public MP3FilesViewModel() { openFileDialog = new OpenFileDialog() { Filter = "MP3 files (*.mp3)|*.mp3" }; MP3Files = new MP3FilesModel() { FileName1 = initF1, FileName2 = initF2, OutputDirectory = initOutDir }; MergeCommand = new MVCommand(OnMerge, CanMerge); SetFile1Command = new MVCommand(OnSetFile1, CanSetProperty); SetFile2Command = new MVCommand(OnSetFile2, CanSetProperty); SetOutDirCommand = new MVCommand(OnSetOutDir, CanSetProperty); }