找回密码
 立即注册
the缩放炮弹植物 | android开发 2022-11-07 60 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
一款Android游戏开发实例,仿写的植物大战僵尸简单版源码,尽管这是个游戏源码,但考验的是综合的Java编程水平,用到的知识点很多,比方坐标定位、发炮弹、碰撞检测、进度条、UI线程更新、图片资源缩放、自定义制作函数,制作屏幕、屏幕接触事情回来消息、关于管理SurfaceView的Canvas上画的效果和动画,控制外表、大孝像素等、确定整个画布等,不包括了不少的游戏通用类,比方子弹的封装类,记录了子弹本身的相关参数,外界通过调用move方法移动子弹;还有图片缩放类,计算图画缩放率,强制缩放图片等。植物发炮弹的的开关,回来true植物需求发炮弹,回来false不需求发炮弹。本资料共包括以下附件:

(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:)

[下载]12084325519.rar




上一篇:《Android开发视频教程》第九集:Button图文混排
下一篇:两个Android引用第三方类库的方法例子