52ky 发表于 2022-10-28 20:06:53

Android游戏开发《热血足球》源码(超详细注释)

/
Ball类是一个承继自Thread类的线程类。其首要的功能首先是封装足球相关的信息,如坐标点、方向、移动速度等。
其次,该类也担任移动足球的方位,进行碰撞检测,这些功能首要是通过run方法来实现的,run方法中首要有两个方法
move和checkCollision,前者担任依据足球的方向(16种之一)来的移动足球的方位。后者关于进行碰撞检测,检测
是不是足球碰到AI或玩家的运动员,是不是遇到鸿沟,是不是遇到一些Bonus如冰冻小球等等。该类还有一个drawSelf方法,
关于在游戏View的myDraw方法中调用以制作自己。
/publicclassBallextendsThread{...}----------------------------------------------------------------------/
该类为全面Bonus的父类,首要提供一些公共的成员或是方法。一个Bonus类首要的包括
自己的制作部分、触发后的制作、自己生命周期计时、触发后生命周期计时、触发后后台
数据的修复、出生成命周期结束后后台数据的恢复。
/publicabstractclassBonus{...}
ginikeer\CrazyFootball\bin\wyf\wpf\AIThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\Ball.class
ginikeer\CrazyFootball\bin\wyf\wpf\Bonus$1.class
ginikeer\CrazyFootball\bin\wyf\wpf\Bonus$2.class
ginikeer\CrazyFootball\bin\wyf\wpf\Bonus.class
ginikeer\CrazyFootball\bin\wyf\wpf\BonusManager.class
ginikeer\CrazyFootball\bin\wyf\wpf\CustomGallery.class
ginikeer\CrazyFootball\bin\wyf\wpf\DrawThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\FootballActivity$1.class
ginikeer\CrazyFootball\bin\wyf\wpf\FootballActivity.class
ginikeer\CrazyFootball\bin\wyf\wpf\GameView.class
ginikeer\CrazyFootball\bin\wyf\wpf\IceBonus.class
ginikeer\CrazyFootball\bin\wyf\wpf\LargerGoalBonus.class
ginikeer\CrazyFootball\bin\wyf\wpf\LoadingDrawThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\LoadingView.class
ginikeer\CrazyFootball\bin\wyf\wpf\Player.class
ginikeer\CrazyFootball\bin\wyf\wpf\PlayerMoveThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$anim.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$attr.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$drawable.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$id.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$layout.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$raw.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$string.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$styleable.class
ginikeer\CrazyFootball\bin\wyf\wpf\R.class
ginikeer\CrazyFootball\bin\wyf\wpf\WelcomeDrawThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\WelcomeThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\WelcomeView.class
ginikeer\CrazyFootball\bin\classes.dex

(/
The Ball class is a thread class inherited from the Thread class. Its primary function is to encapsulate football related information, such as coordinate point, direction, moving speed, etc.
Secondly, this class also serves as the orientation of the mobile football and carries out collision detection. These functions are mainly realized through the run method. There are two main methods in the run method
Move and checkCollision, the former serves as the direction of moving the football according to the direction of the football (one of 16). The latter is about collision detection
Whether football meets AI or players, whether it meets gaps, whether it meets some Bonuses, such as frozen balls, etc. This class also has a drawSelf method,
About calling in the myDraw method of the game View to create your own.
/publicclassBallextendsThread{...}----------------------------------------------------------------------/
This class is the parent class of the comprehensive Bonus. It mainly provides some public members or methods. A Bonus class mainly includes
Self production part, production after triggering, self life cycle timing, life cycle timing after triggering, and background after triggering
Data repair and recovery of background data after the end of life cycle.
/publicabstractclassBonus{...}
ginikeer\CrazyFootball\bin\wyf\wpf\AIThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\Ball.class
ginikeer\CrazyFootball\bin\wyf\wpf\Bonus$1.class
ginikeer\CrazyFootball\bin\wyf\wpf\Bonus$2.class
ginikeer\CrazyFootball\bin\wyf\wpf\Bonus.class
ginikeer\CrazyFootball\bin\wyf\wpf\BonusManager.class
ginikeer\CrazyFootball\bin\wyf\wpf\CustomGallery.class
ginikeer\CrazyFootball\bin\wyf\wpf\DrawThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\FootballActivity$1.class
ginikeer\CrazyFootball\bin\wyf\wpf\FootballActivity.class
ginikeer\CrazyFootball\bin\wyf\wpf\GameView.class
ginikeer\CrazyFootball\bin\wyf\wpf\IceBonus.class
ginikeer\CrazyFootball\bin\wyf\wpf\LargerGoalBonus.class
ginikeer\CrazyFootball\bin\wyf\wpf\LoadingDrawThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\LoadingView.class
ginikeer\CrazyFootball\bin\wyf\wpf\Player.class
ginikeer\CrazyFootball\bin\wyf\wpf\PlayerMoveThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$anim.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$attr.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$drawable.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$id.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$layout.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$raw.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$string.class
ginikeer\CrazyFootball\bin\wyf\wpf\R$styleable.class
ginikeer\CrazyFootball\bin\wyf\wpf\R.class
ginikeer\CrazyFootball\bin\wyf\wpf\WelcomeDrawThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\WelcomeThread.class
ginikeer\CrazyFootball\bin\wyf\wpf\WelcomeView.class
ginikeer\CrazyFootball\bin\classes.dex)




页: [1]
查看完整版本: Android游戏开发《热血足球》源码(超详细注释)