(An Android game development example, a copy of the simple source code of Plant vs. Zombie. Although this is a game source code, it tests the comprehensive Java programming level, and uses many knowledge points, such as coordinate positioning, cannon shot, collision detection, progress bar, UI thread update, image resource scaling, custom production functions, screen production, screen contact information, Canvas effect and animation on managing SurfaceView, Control the appearance, big filial pixel, etc., determine the entire canvas, etc., not including many general game classes, such as the bullet encapsulation class, which records the relevant parameters of the bullet itself. The outside world calls the move method to move the bullet; There are also picture scaling classes, such as calculating the picture scaling rate and forced scaling of pictures. The switch for the plant to fire artillery shells. When it returns true, the plant needs to fire artillery shells, and when it returns false, it does not need to fire artillery shells. This document includes the following annexes:)