els.c

所属分类:游戏
开发工具:C/C++
文件大小:2KB
下载次数:0
上传日期:2021-03-14 22:12:22
上 传 者我不姓荀啊
说明:  通过将node二维数组各方块位置组成不同方块组合(形状)与一维map数组的位置对应,且map数组下标加上方块组合距左、上墙的距离,其中距上墙距离用Y*10在一维数组中表示,通过Y每次循环+1即可得到方块组合自动下落,通过接收按键ad,修改X实现左移右移。 通过node数组排成特定规律,再将方块组合编号(形状)与特定相加数字传入move函数,即可与左右移功能使用同一个函数更改得到当前方块组合旋转后的形状,并限制旋转后的碰撞情况。
(The positions of the blocks in the node two-dimensional array are composed of different block combinations (shapes) corresponding to the positions of the one-dimensional map array,and the subscript of the map array is added with the distance from the block combination to the left and upper wall, where the distance from the upper wall is represented by Y * 10 in the one-dimensional array.)

文件列表:
els.c (5227, 2021-03-14)

近期下载者

相关文件


收藏者