コード例 #1
0
 public void Execute()
 {
     if (owner.InRangeToAttack())
     {
         if (owner.GetTimeToAttack() > 0)
         {
             owner.DecreaseTimeToAttack(Time.deltaTime);
             owner.GetAnimator().SetBool("attack", false);
         }
         else
         {
             owner.GetAnimator().SetBool("attack", true);
             owner.PerformAttack();
             owner.ResetTimeToAttack();
         }
     }
     else
     {
         owner.GetStateMachineEnemy().SetState(new EnemyMovingState(owner));
     }
 }
コード例 #2
0
 public void Enter()
 {
     owner.GetAnimator().SetFloat("speed", 1.0f);
 }