A really good Android flight shooting game source code, like friends can study it. The game altogether San Guan. Self-adapting screen
The game has several places to explain: 1. If you have just entered the game, prompt the error and exit. Please change the following code in the LoadResource class:
Loading exploded pictures for (int i=1; i<=77; i++) { BitMap m = Bitmapfactory.decodestream (Context.getassets (). Open ("explosion/e" + i + ". png")); Explosion_list.add (loadactivity.screenwidth <= && loadactivity.screenheight <= 480? Image.fittheimage (M, 0.5f, 0.5f): M); Explosion_list.add (m); The above-mentioned sentence is changed to this, this is because image.fittheimage this method will constantly call Bitmap.createbitmap () This system comes with a method to cause oom. At the moment I don't know what good way to fix it. If that doesn't work, zoom in on the canvas. (Other methods, such as scaling the map may also appear oom) count++; if (count = = 3) { value++; count=0; } }
2, boss fired bullets, there will be a way to launch a 180° bullet. (as shown in the second picture) since I was also just learning Android soon, the technology was limited. Write the code to death. Actually define an angle, and then let this angle continue to increase, you can achieve the effect of firing 180° bullets
3, the program nested an advertising program, you can ignore,
4, about the program to use the jar package. (Libs in the Gameapi.jar) can go to the Internet next anti-compiled Java software can be compiled under the source code, very simple. I'm not uploading it,
6, when the program plays audio, each audio I declare a Soundpool object to play. Actually, it's all right to declare one. 7, the game source project download: http://code.662p.com/view/4880.html Demo diagram: <ignore_js_op>
|