コード例 #1
0
    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();
            }
        }
    }
コード例 #2
0
 public void OnDirectionStop()
 {
     MHeroController.CleanAim();
 }