Loading app/src/main/java/com/example/game2d/ChalkActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import android.widget.TextView; public class ChalkActivity extends AppCompatActivity implements View.OnClickListener{ MediaPlayer backgroundMusic = MediaPlayer.create( this, R.raw.tanpopo ); MediaPlayer backgroundMusic; TextView totalQuestionsTextView; TextView questionTextView; Loading Loading @@ -55,6 +55,7 @@ public class ChalkActivity extends AppCompatActivity implements View.OnClickList ); // BGM backgroundMusic = MediaPlayer.create(this,R.raw.tanpopo); backgroundMusic.setLooping(true); backgroundMusic.start(); Loading app/src/main/java/com/example/game2d/ChalkGameClass.java +7 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.media.MediaPlayer; import android.util.Log; import android.view.MotionEvent; import android.view.View; Loading @@ -27,6 +28,9 @@ public class ChalkGameClass extends View { private int canvasWidth, canvasHeight; private Bitmap backgroundImage ; //MEDIA MediaPlayer bonk; //CHALK private Bitmap chalk[] = new Bitmap[5]; private int chalkNum = 7; Loading Loading @@ -97,6 +101,8 @@ public class ChalkGameClass extends View { canvasWidth = canvas.getWidth(); canvasHeight = canvas.getHeight(); bonk = MediaPlayer.create(getContext(), R.raw.bonk); if (backgroundImage == null) return; // Use the same Matrix over and over again to minimize // allocation in onDraw. Loading @@ -122,6 +128,7 @@ public class ChalkGameClass extends View { if(normGravity) { playerSpeed = 125; bonk.start(); } } //limiting the player's y to the top of the screen Loading app/src/main/java/com/example/game2d/MainActivity.java +8 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ MainActivity is the entry point */ public class MainActivity extends AppCompatActivity { MediaPlayer backgroundMusic; @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); Loading @@ -28,7 +30,7 @@ public class MainActivity extends AppCompatActivity { WindowManager.LayoutParams.FLAG_FULLSCREEN ); MediaPlayer backgroundMusic = MediaPlayer.create( this, R.raw.moog_city_two ); backgroundMusic = MediaPlayer.create( this, R.raw.moog_city_two ); backgroundMusic.setLooping(true); backgroundMusic.start(); Loading @@ -41,5 +43,10 @@ public class MainActivity extends AppCompatActivity { setContentView(new Game(this)); } protected void onPause() { super.onPause(); backgroundMusic.stop(); } } No newline at end of file local.properties +2 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ # !!!!!!!!!!!!!!!!!!!!! WAIT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # don't delete other people's paths, just put a hashtag to comment it out and then uncomment or add yours ty :) sdk.dir=/home/elena/Android/Sdk #sdk.dir=/Users/prnv15/Library/Android/sdk #sdk.dir=/home/elena/Android/Sdk sdk.dir=/Users/prnv15/Library/Android/sdk >>>>>>>=fa0b39785e340f2e4603d94bdc597d48bc674390 <<<<<<<=HEAD Loading
app/src/main/java/com/example/game2d/ChalkActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import android.widget.TextView; public class ChalkActivity extends AppCompatActivity implements View.OnClickListener{ MediaPlayer backgroundMusic = MediaPlayer.create( this, R.raw.tanpopo ); MediaPlayer backgroundMusic; TextView totalQuestionsTextView; TextView questionTextView; Loading Loading @@ -55,6 +55,7 @@ public class ChalkActivity extends AppCompatActivity implements View.OnClickList ); // BGM backgroundMusic = MediaPlayer.create(this,R.raw.tanpopo); backgroundMusic.setLooping(true); backgroundMusic.start(); Loading
app/src/main/java/com/example/game2d/ChalkGameClass.java +7 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Matrix; import android.graphics.Paint; import android.media.MediaPlayer; import android.util.Log; import android.view.MotionEvent; import android.view.View; Loading @@ -27,6 +28,9 @@ public class ChalkGameClass extends View { private int canvasWidth, canvasHeight; private Bitmap backgroundImage ; //MEDIA MediaPlayer bonk; //CHALK private Bitmap chalk[] = new Bitmap[5]; private int chalkNum = 7; Loading Loading @@ -97,6 +101,8 @@ public class ChalkGameClass extends View { canvasWidth = canvas.getWidth(); canvasHeight = canvas.getHeight(); bonk = MediaPlayer.create(getContext(), R.raw.bonk); if (backgroundImage == null) return; // Use the same Matrix over and over again to minimize // allocation in onDraw. Loading @@ -122,6 +128,7 @@ public class ChalkGameClass extends View { if(normGravity) { playerSpeed = 125; bonk.start(); } } //limiting the player's y to the top of the screen Loading
app/src/main/java/com/example/game2d/MainActivity.java +8 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ MainActivity is the entry point */ public class MainActivity extends AppCompatActivity { MediaPlayer backgroundMusic; @Override protected void onCreate(Bundle savedInstanceState) { requestWindowFeature(Window.FEATURE_NO_TITLE); Loading @@ -28,7 +30,7 @@ public class MainActivity extends AppCompatActivity { WindowManager.LayoutParams.FLAG_FULLSCREEN ); MediaPlayer backgroundMusic = MediaPlayer.create( this, R.raw.moog_city_two ); backgroundMusic = MediaPlayer.create( this, R.raw.moog_city_two ); backgroundMusic.setLooping(true); backgroundMusic.start(); Loading @@ -41,5 +43,10 @@ public class MainActivity extends AppCompatActivity { setContentView(new Game(this)); } protected void onPause() { super.onPause(); backgroundMusic.stop(); } } No newline at end of file
local.properties +2 −2 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ # !!!!!!!!!!!!!!!!!!!!! WAIT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # don't delete other people's paths, just put a hashtag to comment it out and then uncomment or add yours ty :) sdk.dir=/home/elena/Android/Sdk #sdk.dir=/Users/prnv15/Library/Android/sdk #sdk.dir=/home/elena/Android/Sdk sdk.dir=/Users/prnv15/Library/Android/sdk >>>>>>>=fa0b39785e340f2e4603d94bdc597d48bc674390 <<<<<<<=HEAD