文件名称:snake
介绍说明--下载内容均来自于网络,请自行研究使用
这是一个简单的贪吃蛇游戏!只要把这个游戏导入eclipse就可以运行和查看源代码-import com.ruimin.snake.model.GameConstant
import com.ruimin.snake.view.GameView
import android.os.Bundle
import android.os.Handler
import android.os.Message
import android.app.Activity
import android.app.AlertDialog
import android.content.DialogInterface
import android.content.Intent
import android.content.SharedPreferences
import android.view.KeyEvent
import android.view.Menu
import android.view.ViewGroup
import android.view.ViewGroup.LayoutParams
import android.widget.LinearLayout
public class GameActivity extends Activity {
private LinearLayout layout = null
private GameView gameView = null
MyHandler handler = new MyHandler()
// 是否暂停
private boolean isPaused = false
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_game)
}
public void initData() {
GameConstant.curOrientation = GameConstant.DOWN
GameConstant.map = null
GameC
import com.ruimin.snake.view.GameView
import android.os.Bundle
import android.os.Handler
import android.os.Message
import android.app.Activity
import android.app.AlertDialog
import android.content.DialogInterface
import android.content.Intent
import android.content.SharedPreferences
import android.view.KeyEvent
import android.view.Menu
import android.view.ViewGroup
import android.view.ViewGroup.LayoutParams
import android.widget.LinearLayout
public class GameActivity extends Activity {
private LinearLayout layout = null
private GameView gameView = null
MyHandler handler = new MyHandler()
// 是否暂停
private boolean isPaused = false
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_game)
}
public void initData() {
GameConstant.curOrientation = GameConstant.DOWN
GameConstant.map = null
GameC
(系统自动生成,下载前可以参看下载内容)
下载文件列表
我的贪吃蛇
..........\.classpath
..........\.project
..........\.settings
..........\.........\org.eclipse.jdt.core.prefs
..........\AndroidManifest.xml
..........\assets
..........\bin
..........\...\AndroidManifest.xml
..........\...\classes
..........\...\.......\com
..........\...\.......\...\ruimin
..........\...\.......\...\......\snake
..........\...\.......\...\......\.....\BuildConfig.class
..........\...\.......\...\......\.....\DengLuActivity$1.class
..........\...\.......\...\......\.....\DengLuActivity.class
..........\...\.......\...\......\.....\GameActivity$1.class
..........\...\.......\...\......\.....\GameActivity$2.class
..........\...\.......\...\......\.....\GameActivity$MyHandler$1.class
..........\...\.......\...\......\.....\GameActivity$MyHandler$2.class
..........\...\.......\...\......\.....\GameActivity$MyHandler.class
..........\...\.......\...\......\.....\GameActivity$UpThread.class
..........\...\.......\...\......\.....\GameActivity.class
..........\...\.......\...\......\.....\MenuActivity$1.class
..........\...\.......\...\......\.....\MenuActivity$2.class
..........\...\.......\...\......\.....\MenuActivity$3.class
..........\...\.......\...\......\.....\MenuActivity$4.class
..........\...\.......\...\......\.....\MenuActivity$5.class
..........\...\.......\...\......\.....\MenuActivity.class
..........\...\.......\...\......\.....\R$attr.class
..........\...\.......\...\......\.....\R$dimen.class
..........\...\.......\...\......\.....\R$drawable.class
..........\...\.......\...\......\.....\R$id.class
..........\...\.......\...\......\.....\R$layout.class
..........\...\.......\...\......\.....\R$menu.class
..........\...\.......\...\......\.....\R$string.class
..........\...\.......\...\......\.....\R$style.class
..........\...\.......\...\......\.....\R.class
..........\...\.......\...\......\.....\WelcomeActivity$1.class
..........\...\.......\...\......\.....\WelcomeActivity.class
..........\...\.......\...\......\.....\model
..........\...\.......\...\......\.....\.....\Food.class
..........\...\.......\...\......\.....\.....\GameConstant.class
..........\...\.......\...\......\.....\.....\Point.class
..........\...\.......\...\......\.....\.....\Snake.class
..........\...\.......\...\......\.....\view
..........\...\.......\...\......\.....\....\GameControl.class
..........\...\.......\...\......\.....\....\GameView.class
..........\...\classes.dex
..........\...\dexedLibs
..........\...\.........\android-support-v4-6edd5c4c02b82f78f2046955d568ee78.jar
..........\...\res
..........\...\...\drawable-hdpi
..........\...\...\.............\greenstar.png
..........\...\...\.............\ic_launcher.png
..........\...\...\.............\redstar.png
..........\...\...\.............\yellowstar.png
..........\...\...\drawable-mdpi
..........\...\...\.............\ic_launcher.png
..........\...\...\drawable-xhdpi
..........\...\...\..............\ic_launcher.png
..........\...\...\drawable-xxhdpi
..........\...\...\...............\ic_launcher.png
..........\...\resources.ap_
..........\...\我的贪吃蛇.apk
..........\gen
..........\...\com
..........\...\...\ruimin
..........\...\...\......\snake
..........\...\...\......\.....\BuildConfig.java
..........\...\...\......\.....\R.java
..........\ic_launcher-web.png
..........\libs
..........\....\android-support-v4.jar
..........\proguard-project.txt
..........\project.properties
..........\res
..........\...\drawable-hdpi
..........\...\.............\apple.jpg
..........\...\.............\greenstar.png
..........\...\.............\ic_launcher.png
..........\...\.............\redstar.png
..........\...\.............\yellowstar.png
..........\...\drawable-ldpi
..........\...\drawable-mdpi
..........\...\.............\ic_launcher.png
..........\...\drawable-xhdpi
..........\...\..............\ic_launcher.png
..........\...\..............\xiaoshe.jpg
..........\...\..............\xiaoshe2.jpg
..........\...\..............\xiaoshe3.jpg
..........\...\drawable-xxhdpi
..........\...\...............\ic_launcher.png
..........\...\layout
.......