Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package maxim.android02;
- import android.app.Activity;
- import android.content.Intent;
- import android.os.Bundle;
- import android.util.Log;
- import android.view.MotionEvent;
- import android.view.Window;
- public class Activity_Main extends Activity {
- GameView view;
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setGameView();
- // setContentView(R.layout.main);
- }
- protected void onStart()
- {
- super.onStart();
- this.setContentView(view);
- view.startGameView();
- }
- protected void onDestroy()
- {
- super.onDestroy();
- view.destroyGameView();
- }
- protected void onPause()
- {
- super.onPause();
- view.pauseGameView();
- }
- protected void onResume()
- {
- super.onResume();
- view.resumeGameView();
- }
- public void setGameView()
- {
- view= new MainMenu(this);
- }
- public void changeActivity()
- {
- Log.d("changing", "activity");
- Intent i=new Intent(Activity_Main.this, Activity_Level.class);
- startActivity(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement