This source code is a good leisure class game source, flying round (Flappy Bird) game source V1.0, this project is a imitation Flappy Bird of the small game, but the Flappy Bird inside the bird replaced by a simple circle. Interested friends can look into it. This project is encoded by default GBK.
SOURCE Download: http://code.662p.com/view/9013.html
Public classLoadingactivity extends Activity {@Override Public voidonCreate (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 (NewAdlistener () {@Override Public voidOnreceivead (Ad arg0) {gamestart.setvisibility (view.visible); } @Override Public voidOnpresentscreen (Ad arg0) {//TODO auto-generated Method Stub} @Override Public voidonleaveapplication (Ad arg0) {//TODO auto-generated Method Stub} @Override Public voidOnfailedtoreceivead (Ad arg0, ErrorCode arg1) {//TODO auto-generated Method Stub} @Override Public voidOndismissscreen (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 (NewView.onclicklistener () {@Override Public voidOnClick (View arg0) {Intent Intent=NewIntent (loadingactivity. This, Gamebirdactivity.class); Intent.setflags (Intent.flag_activity_clear_top); StartActivity (Intent); Finish (); } }); } Private int[] Getsettingdata () {sharedpreferences gb_settings= Getsharedpreferences (Gamebirdactivity.gamebirdsettingsfile,0); intLast = Gb_settings.getint (Gamebirdactivity.settings_levellast,0); inttop = Gb_settings.getint (Gamebirdactivity.settings_leveltop,0); return New int[]{last, Top}; } @Override PublicBoolean OnKeyDown (intKeyCode, KeyEventEvent) { if(KeyCode = =keyevent.keycode_back) { Try{GameBirdActivity.instance.finish (); }Catch(Exception e) {} finish (); System.exit (0); return true; } returnSuper.onkeydown (KeyCode,Event); }}
- <ignore_js_op> operation
- <ignore_js_op> operation
- <ignore_js_op>
Run
- Detailed Description: http://android.662p.com/thread-5878-1-1.html
Flying round (Flappy Bird) game source full version