public void DoJump(JumpModes mode) { switch (mode) { case JumpModes.Die: GameManager.Inst.Die(); break; case JumpModes.Jump: rigidbody2D.velocity = rigidbody2D.velocity.withY(JumpForce); AudioManager.Inst.PlaySound("jump"); break; } }
public void SetJumpMode(int mode) { JumpMode = (JumpModes)mode; }