资 源 简 介
C++开发的推箱子游戏
1.类的划分
Cdraw类
绘画加载地图(包括围墙、人、箱子等等)
Cman类
是否完成(过关)
即时更新地图
2.设计思想
从文件map.txt里读取地图信息,然后通过Cdraw类加载地图,通过keydown事件调用Cman里的重载函数updatemap,
单参数updateMap(UINT nChar)是用于更改当前小人以及箱子的坐标,记录下来后传给updateMap(int x1, int y1, int x2, int y2, int x3, int y3)
从而改变地图。-C development Tuixiangzi a game. Class division Cdraw painting category loaded maps (including the wall, boxes, etc.) if the class completed Cman (clearance) updated maps 2. Design ideas from the paper map.txt Lane read map information, then pass Cdraw Class Loading maps, Calling the incident through keydown Cman Lane updatemap of overloading functions, updateMap single parameter (UINT nChar) is used to change the current villains and the coordinates of the boxes, After record pass updateMap (int x1, y1 int, int x2, int y2, x3 int, int y3), thus changing map.