A really good Android flying shooting game source code, Android shooting game
A really good Android flying shooting game source code. If you like it, you can study it. The game has three levels. Adaptive Screen
There are several notes about the game: 1. If you have just entered the game, an error is prompted and you quit. Change the following code in the LoadResource class:
// Load the exploded Image For (int I = 1; I <= 77; I ++) { BitMap m = BitmapFactory. decodeStream (context. getAssets (). open ("explosion/e" + I + ". png ")); // Explosion_list.add (LoadActivity. ScreenWidth <= 320 & LoadActivity. ScreenHeight <= 480? Image. FitTheImage (m, 0.5f, 0.5f): m ); Explosion_list.add (m); // The above sentence is changed to this, because Image. the FitTheImage method constantly calls Bitmap. the built-in createBitmap () method causes OOM. at present, I do not know any good solutions. If not, scale the canvas .. (OOM may also appear in other methods, such as scaling a map) Count ++; If (count = 3) { Value ++; Count = 0; } }
2. When the Boss launches a bullet, there will be a method to launch a 180 ° bullet. (As shown in the second figure) because I was just learning android, the technology was limited. Write the code to death. In fact, define an angle, and then let this angle increase continuously to achieve the effect of launching a 180 ° bullet.
3. An advertisement program is nested in the program,
4. The jar package used by the program. (GameApi. jar in libs) You can get the source code by decompiling the next decompiled java software on the Internet. I will not upload any more,
6. When the program plays the audio, I declare a SoundPool object for playing each audio. In fact, just declare one. 7, the game source project download: http://code.662p.com/view/4880.html Demo diagram: <Ignore_js_op>
|
Http://android.662p.com/thread-3247-1-1.html