Commit ac44d150 authored by P P's avatar P P
Browse files

Merge remote-tracking branch 'origin/top-secret' into top-secret

parents b04fb7b2 0d11cd04
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ public class ChalkGameClass extends View {
    private Bitmap backgroundImage ;

    //MEDIA
   // MediaPlayer bonk,  oof;
    MediaPlayer bonk = MediaPlayer.create(getContext(), R.raw.bonk);
    MediaPlayer oof = MediaPlayer.create(getContext(), R.raw.oof);

    //CHALK
    private Bitmap chalk[] = new Bitmap[5];
@@ -120,9 +121,6 @@ public class ChalkGameClass extends View {
        canvasWidth = canvas.getWidth();
        canvasHeight = canvas.getHeight();

       // bonk = MediaPlayer.create(getContext(), R.raw.bonk);
        //oof = MediaPlayer.create(getContext(), R.raw.oof);

        if (backgroundImage == null) return;
        // Use the same Matrix over and over again to minimize
        // allocation in onDraw.
@@ -151,7 +149,7 @@ public class ChalkGameClass extends View {
            if(normGravity)
            {
                playerSpeed = 125;
               // bonk.start();
                bonk.start();
            }
        }       //limiting the player's y to the top of the screen

@@ -183,7 +181,7 @@ public class ChalkGameClass extends View {
            if (hitChalkChecker(chalkX[ii], chalkY[ii])) //if player collides with chalk
            {
                chalkX[ii] = chalkX[ii] - 200; //makes chalk disappear
                //oof.start();
                oof.start();
                lifecounter--; //reduces health;

                if(lifecounter == 0)  //if all lives used up