Beispiel #1
0
 public void Hit(float force, Vector3 direction)
 {
     CharacterAnimator.SetTrigger("hit");
     punchAudio.Play();
     CharacterRigidbody2D.AddForce(direction * force);
 }
Beispiel #2
0
 public void Jump()
 {
     CharacterAnimator.SetTrigger("jump");
     CharacterRigidbody2D.AddForce(Vector3.up * jumpForce);
 }