/**
  * This initiates the lunge toward the target while attacking
  */
 public void JumpTowardTarget(AIState state)
 {
     if (state == AIState.Attack)
     {
         frb.AddVelocity(Vector3.up * JumpSpeed + Vector3.right * faceDir * LungeSpeed);
     }
 }
示例#2
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.UpArrow))
     {
         frb.AddVelocity(Vector3.up * JumpSpeed);
     }
 }