-
医疗软件
- 2023-03-29 23:55:04下载
- 积分:1
-
Calculation of arbitrary square matrix eigenvalue eigenvector VC++ Source
计算任意方矩阵特征值特征向量的VC++源码-Calculation of arbitrary square matrix eigenvalue eigenvector VC++ Source
- 2022-02-20 06:50:23下载
- 积分:1
-
ephtmltopdf.lic ephtmltopdf.lic
Ephtmltopdf.lic Ephtmltopdf.lic-Ephtmltopdf.lic Ephtmltopdf.lic Ephtmltopdf.lic
- 2022-01-28 06:33:29下载
- 积分:1
-
一本很好的C++书 适合初学者
一本很好的C++书 适合初学者 -A very good C++ Book suitable for beginners
- 2023-01-04 03:40:03下载
- 积分:1
-
迷宫追寻小游戏 C++MFC
应用背景
这个游戏为玩家控制红色方块,去吃掉棕色,绿色,蓝色的方块,一旦一个方块被吃,便会自动生成另一个相同颜色的方块。直到游戏时间结束为止。
程序函数功能:
ondraw函数:
显示游戏界面(用画刷刷成白色),显示地图(黑色),显示食物0,1,2(分别为:棕色,绿色,蓝色),显示玩家(红色)
显示文字,时间,分数。
OnEraseBkgnd函数:
用来更新窗口背景,游戏以位图为窗口背景。
OnGameStart函数:
关联窗口菜单中的开始游戏。包括:
IniGame();(初始化游戏)
m_nGameStatus=1;(游戏状态1,开始)
SetTimer(1,100,NULL);(定时器0.1秒执行一次OnTime)
Invalidate();(转向OnDraw)
IniGame函数:
初始化游戏,确定游戏显示位置,确定玩家初始位置,转向IniAim函数
IniAim函数:
初始化目标,这里的三个目标的位置为随机产生。
OnKeyDown函数:
监控设备按下的键,确定玩家移动方向。
ReDisPlay函数:
重画点所在的小方块。减少对Invalidate()的调用,使屏幕不太闪硕。
OmTimer函数:
完成时间的计算。
关键技术游戏中的人工智能:
棕色方块的移动算法为基本寻路算法—物体沿着墙走。
绿色方块的移动算法为基本的逃避算法—物体总会向玩家的反方向移动。
蓝色方块的移动算法为漫游算法—随机产生一个方向值,物体移动的方向不
- 2022-03-23 18:25:51下载
- 积分:1
-
u盘源码,做驱动程序前网上搜索得来,后来不需要做了,就没有仔细看过,很抱歉,应该有用...
u盘源码,做驱动程序前网上搜索得来,后来不需要做了,就没有仔细看过,很抱歉,应该有用-u disk source code, so drivers-line search it, then you do not need to do, it would not read carefully. I am sorry, it should be useful
- 2023-02-24 02:50:03下载
- 积分:1
-
串口精灵源代码, 有很高的参考价值.
AppWizard has created this CommWizard application for you....
串口精灵源代码, 有很高的参考价值.
AppWizard has created this CommWizard application for you. This application
not only demonstrates the basics of using the Microsoft Foundation classes
but is also a starting point for writing your application.-serial Wizard source code, a high reference value. AppWizard has created this CommWiza rd application for you. This application not on ly demonstrates the basics of using the Microso ft Foundation classes but is also a starting poi nt for writing your application.
- 2022-05-22 18:53:23下载
- 积分:1
-
交通分布三阶计算器
大三学生平时做的一个小程序,只能用于三阶...
- 2022-01-26 06:02:00下载
- 积分:1
-
A fractal geometry system, the preparation of the use of IFS
一个分形几何中利用IFS系统编写的基于地形的生成-A fractal geometry system, the preparation of the use of IFS-based terrain generation
- 2023-07-19 05:50:02下载
- 积分:1
-
ancient chinese wisdom.open your mind, and find yourself,soon you ll find a new...
ancient chinese wisdom.open your mind, and find yourself,soon you ll find a new world.
- 2022-04-08 02:21:36下载
- 积分:1