-
嵌入式WINCE树型控件编程使用,用EVC开发实现
嵌入式WINCE树型控件编程使用,用EVC开发实现-Embedded WINCE programming using tree control with EVC realize development
- 2023-03-19 21:40:04下载
- 积分: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
-
用delphi写的数据库连接程序小程序,供初学者参考
用delphi写的数据库连接程序小程序,供初学者参考-used to write database connectivity procedures small program for beginners reference
- 2022-03-26 17:36:18下载
- 积分:1
-
ASPX ImageUploadExample
ASPX ImageUploadExample- ASPX ImageUploadExample
- 2023-06-27 19:40:03下载
- 积分:1
-
linux 红帽子9用QT编写的数字方式显示的时钟程序
linux 红帽子9用QT编写的数字方式显示的时钟程序-linux red hat 9 with QT written procedures for digital display clock
- 2023-07-09 12:10:03下载
- 积分:1
-
一个躲开炸弹的小游戏,类似手机上的那种,环境VS2005
一个躲开炸弹的小游戏,类似手机上的那种,环境VS2005-a small bomb to escape the game, similar to the kind of phone, the environment VS2005
- 2022-05-17 13:08:42下载
- 积分:1
-
在中国这一电子电能表生产大国的市场上,哪些企业正在批量供应电子电能表计量芯片? 他们提供的产品可靠性如何? 这些年
累计销售情况又怎么样? 他们为客户提供服...
在中国这一电子电能表生产大国的市场上,哪些企业正在批量供应电子电能表计量芯片? 他们提供的产品可靠性如何? 这些年
累计销售情况又怎么样? 他们为客户提供服务支持的理念是什么?-In China, the electronic energy meter-producing countries of the market, which companies are bulk suppliers of electronic power metering chip? Provide them with the reliability of the product? Over the years accumulated sales of what? They provide services to customers in support of the idea of that?
- 2022-04-07 09:49:52下载
- 积分:1
-
pure virtual function and abstract category. The VC a virtual function of the so...
纯虚函数和抽象类。一个有关VC++虚函数的源程序,比较适合VC++初学者。以后我上传一系列这种类型的源程序供大家学习之用。-pure virtual function and abstract category. The VC a virtual function of the source, more suitable for beginners VC. After I uploaded a series of this type of source for all learning.
- 2022-02-07 02:15:10下载
- 积分:1
-
C algorithms commonly used procedures set
C常用算法程序集-徐士良-C algorithms commonly used procedures set-XU Shi-liang
- 2022-03-22 22:57:05下载
- 积分:1
-
Hangman game in Visual basic 6.0
Hangman game in Visual basic 6.0
- 2022-08-19 12:52:01下载
- 积分:1