public void attack() { actionFrame = 0; //currentAction = PlayerAction.attacking; Random r = new Random(); int h = r.Next(1, 5); switch (h) { case (1): TCM_Audio.playWAV("pewDown2"); break; case (2): TCM_Audio.playWAV("pewDown1"); break; case (3): TCM_Audio.playWAV("pew"); break; case (4): TCM_Audio.playWAV("pewUp1"); break; case (5): TCM_Audio.playWAV("pewUp2"); break; } }
public void jump() { if (grounded) { ySpeed = -jumpStrength; jumpFrame = 10; TCM_Audio.playWAV("grunt"); } }