这个源码是一个不错的休闲类的游戏源码,飞翔的圆(Flappy Bird)游戏源码V1.0,本项目是一个仿Flappy Bird的小游戏,只不过是把Flappy Bird里面的鸟替换成了简单的圆。感兴趣的朋友可以研究一下。本项目默认编码GBK。
创新互联-专业网站定制、快速模板网站建设、高性价比雨花网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式雨花网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖雨花地区。费用合理售后完善,十年实体公司更值得信赖。×××:http://code.662p.com/view/9013.html
public class LoadingActivity extends Activity { @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); setContentView(R.layout.loading); final TextView gameStart = (TextView)findViewById(R.id.game_start); AdView adView = (AdView)findViewById(R.id.adView); adView.setAdListener(new AdListener() { @Override public void onReceiveAd(Ad arg0) { gameStart.setVisibility(View.VISIBLE); } @Override public void onPresentScreen(Ad arg0) { // TODO Auto-generated method stub } @Override public void onLeaveApplication(Ad arg0) { // TODO Auto-generated method stub } @Override public void onFailedToReceiveAd(Ad arg0, ErrorCode arg1) { // TODO Auto-generated method stub } @Override public void onDismissScreen(Ad arg0) { // TODO Auto-generated method stub } }); View gameMessage = findViewById(R.id.GameMessage); int[] data = getSettingData(); TextView levelMessage = (TextView)findViewById(R.id.level_Message); levelMessage.setText("SCORE: "+data[0]+"\nBEST: "+data[1]); gameMessage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { Intent intent = new Intent(LoadingActivity.this, GameBirdActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); finish(); } }); } private int[] getSettingData() { SharedPreferences gb_settings = getSharedPreferences(GameBirdActivity.GameBirdSettingsFile, 0); int last = gb_settings.getInt(GameBirdActivity.Settings_LevelLast, 0); int top = gb_settings.getInt(GameBirdActivity.Settings_LevelTop, 0); return new int[]{last, top}; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { try{ GameBirdActivity.instance.finish(); }catch(Exception e){} finish(); System.exit(0); return true; } return super.onKeyDown(keyCode, event); } }
运行截图
运行截图
运行截图
详细说明:http://android.662p.com/thread-5878-1-1.html
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。