Android Open Source - Open-Android-Game Home






From Project

Back to project page Open-Android-Game.

License

The source code is released under:

GNU General Public License

If you think the Android project Open-Android-Game 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

/* Home.java - The entry view of game.
 * /*from ww  w .  j av  a  2  s. c o m*/
 * Copyright  2011 Open-Android-Game Group
 * Please see the file COPYING in this
 * distribution for license terms.
 */

  /* Xiaolong, added Aug 09 */

package com.kylepaulsen.openAndroidGame;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class Home extends Activity implements OnClickListener{
    
  private Button introBtn;
  private Button startBtn;

  /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);     
        setContentView(R.layout.home);
        introBtn =(Button)findViewById(R.id.intro_btn);
        introBtn.setOnClickListener(this);
        startBtn =(Button)findViewById(R.id.start_btn);
        startBtn.setOnClickListener(this);    
    }
    
  @Override
  public void onClick(View v) {
    if(v==introBtn){ 
      //TODO do sth to show the intro page......
    }else if(v==startBtn){
      startActivity(new Intent(Home.this, MainActivity.class));  
    }    
  }
}




Java Source Code List

com.kylepaulsen.openAndroidGame.BaseTiles.java
com.kylepaulsen.openAndroidGame.Biome.java
com.kylepaulsen.openAndroidGame.Constants.java
com.kylepaulsen.openAndroidGame.CopyOfPlayer.java
com.kylepaulsen.openAndroidGame.GameProgram.java
com.kylepaulsen.openAndroidGame.GraphicsView.java
com.kylepaulsen.openAndroidGame.Home.java
com.kylepaulsen.openAndroidGame.LocationTask.java
com.kylepaulsen.openAndroidGame.MainActivity.java
com.kylepaulsen.openAndroidGame.Monster.java
com.kylepaulsen.openAndroidGame.PlayerAnimated.java
com.kylepaulsen.openAndroidGame.Player.java
com.kylepaulsen.openAndroidGame.Tile.java
com.kylepaulsen.openAndroidGame.WorldEnt.java
com.kylepaulsen.openAndroidGame.World.java