這個(gè)源碼是一個(gè)不錯(cuò)的休閑類(lèi)的游戲源碼,飛翔的圓(Flappy Bird)游戲源碼V1.0,本項(xiàng)目是一個(gè)仿Flappy Bird的小游戲,只不過(guò)是把Flappy Bird里面的鳥(niǎo)替換成了簡(jiǎn)單的圓。感興趣的朋友可以研究一下。本項(xiàng)目默認(rèn)編碼GBK。
創(chuàng)新互聯(lián)-專(zhuān)業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比雨花網(wǎng)站開(kāi)發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式雨花網(wǎng)站制作公司更省心,省錢(qián),快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋雨花地區(qū)。費(fèi)用合理售后完善,十年實(shí)體公司更值得信賴。×××: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); } }
運(yùn)行截圖
運(yùn)行截圖
運(yùn)行截圖
詳細(xì)說(shuō)明:http://android.662p.com/thread-5878-1-1.html
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專(zhuān)為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。