/** * 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); } }
private void Update() { if (Input.GetKeyDown(KeyCode.UpArrow)) { frb.AddVelocity(Vector3.up * JumpSpeed); } }