Android Open Source - TheFirstMyth02 Game Activity






From Project

Back to project page TheFirstMyth02.

License

The source code is released under:

MIT License

If you think the Android project TheFirstMyth02 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.game.fengshen;
//from  w  w  w .  j av a 2  s.  com

import com.example.fengshen.R;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.pm.ActivityInfo;
import android.view.Window;
import android.view.WindowManager;

public class GameActivity extends Activity {

  private GameView msf;

  @Override
  protected void onResume() {
    // TODO Auto-generated method stub
    super.onResume();
  }

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    // ?????
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    msf = new GameView(this);
    setContentView(msf);
    // setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
  }

  @Override
  public void onBackPressed() {
    // TODO Auto-generated method stub
    new AlertDialog.Builder(this)

        .setTitle("??????")
        .setIcon(R.drawable.icon)

        .setMessage("??????????")
        .setPositiveButton("??", new DialogInterface.OnClickListener() {
          // ??
          public void onClick(DialogInterface dialoginterface, int i) {
            android.os.Process.killProcess(android.os.Process
                .myPid());

            // SoundManager.Instance.stopBackgroundSound();
          }
        })
        .setNegativeButton("????", new DialogInterface.OnClickListener() {
          /* ??????????? */
          public void onClick(DialogInterface dialoginterface, int i) {
            // ??????
          }
        }).show();

  }

  public void onPause() {
    super.onPause();
  }
}




Java Source Code List

.Test.java
com.game.base.BaseInfo.java
com.game.base.GameBackGround.java
com.game.base.GameChapterBaseSet_Shentan.java
com.game.base.GameMap.java
com.game.base.PubSet.java
com.game.commen.AStarMap.java
com.game.commen.AStarNode.java
com.game.commen.AStar.java
com.game.commen.ActionToDo.java
com.game.commen.BitmapTouchChecker.java
com.game.commen.BitmapUtil.java
com.game.commen.Direction.java
com.game.commen.EffectName.java
com.game.commen.GameXmlcommen.java
com.game.commen.GetImgCommen.java
com.game.commen.IrregularButton.java
com.game.commen.MapName.java
com.game.commen.Paintforziti.java
com.game.commen.ToDo.java
com.game.data.BaseInfo.java
com.game.data.RoleData_Main.java
com.game.data.RoleData.java
com.game.data.StroyTipData.java
com.game.effect.SpecialEffect.java
com.game.fengshen.GameActivity.java
com.game.fengshen.GameMainActivity.java
com.game.fengshen.GameView.java
com.game.fengshen.MoveTest.java
com.game.renwu.Objs.java
com.game.renwu.SpiritMain.java
com.game.renwu.Spirit_Main.java
com.game.renwu.Spirit_NPC.java
com.game.renwu.Spirit.java
com.game.renwu.Spiritgirl.java
com.game.stroy.MainStroy.java
com.game.tip.PublicTips.java