当前位置:首页 » 操作系统 » java超级玛丽源码

java超级玛丽源码

发布时间: 2023-06-14 18:10:49

A. c语言编程小游戏实现的超级玛丽游戏源码

int game::GetCommand()

{

int c = 0;

if (GetAsyncKeyState('A') & 0x8000)

c |= CMD_LEFT;

if (GetAsyncKeyState('D') & 0x8000)

c |= CMD_RIGHT;

if ((GetAsyncKeyState('W') & 0x8000)||(GetAsyncKeyState('K') & 0x8000))

c |= CMD_UP;

if (GetAsyncKeyState('S') & 0x8000)

c |= CMD_DOWN;

if (GetAsyncKeyState('J') & 0x8000)

c |= CMD_SHOOT;

if (GetAsyncKeyState(VK_ESCAPE) & 0x8000)

c |= CMD_ESC;

return c;

}

void game::left()

{

role.iframe*=-1;

role.turn=-1;

role.x-=STEP;

if(is_l_touch(1)==1)

role.x+=STEP;

if(role.x

role.x+=STEP;

}

void game::right()

{

role.iframe*=-1;

role.turn=1;

role.x+=STEP;

if(is_r_touch(1)==1)

role.x-=STEP;

if(role.x>role.xright&&(-xmap+role.x

{

role.x-=STEP;

xmapsky-=1;

xmap-=STEP;

}

}

void game::up()

{

mciSendString("play mymusic4 from 0", NULL, 0, NULL);

role.iframe*=-1;

v0=-sqrt(2*G*HIGH);

role.jump=1;

}

B. 超级玛丽金手指代码

0554CCE4。

热点内容
木瓜奇迹脚本 发布:2025-09-17 01:54:25 浏览:403
小孩子脚本 发布:2025-09-17 01:52:07 浏览:679
c语言怎么安装 发布:2025-09-17 01:43:30 浏览:792
android控件设置位置设置 发布:2025-09-17 01:36:17 浏览:448
mfc与c语言 发布:2025-09-17 01:33:52 浏览:32
扣扣空间相册怎么加密 发布:2025-09-17 01:32:21 浏览:872
移动文件夹的软件 发布:2025-09-17 01:31:47 浏览:646
联通吉林省dns服务器地址 发布:2025-09-17 01:26:56 浏览:960
python列表删除指定元素 发布:2025-09-17 01:26:13 浏览:942
安卓手机设置安全管理器有什么用 发布:2025-09-17 01:23:32 浏览:900