Exemple #1
0
    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;
        }
    }
Exemple #2
0
 public void SetJumpMode(int mode)
 {
     JumpMode = (JumpModes)mode;
 }