public override void Reason(float timeElapse) { base.Reason(timeElapse); //---没有下一步就停下 if (MHeroController._NextDirection == EDirection.None) { MMachine.PerformTransition(EBehaviourTransition.ToIdle); return; } if (NoumenonT.position.MDistanceIgnoreY(aimPosition) < 0.08f) { //-- MHeroController.SetCurToNext(); MHeroController.CleanNext(); if (MHeroController._AimDirection != EDirection.None) { bool canMove = MissionManager.I.CanMove(MHeroController.MCurCoordinate, MHeroController._AimDirection); if (canMove) { MHeroController.SetAimToNext(); aimPosition = MHeroController.GetNextPosition(); } MHeroController.CleanAim(); MHeroController.TrunToNext(); } } }
public void OnDirectionStop() { MHeroController.CleanAim(); }