当前位置:首页 » 操作系统 » 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。

热点内容
R参数编程 发布:2025-03-29 22:59:50 浏览:239
连接sqlserver2008 发布:2025-03-29 22:47:24 浏览:625
电信开户密码是多少 发布:2025-03-29 22:44:53 浏览:505
vivo手机存储空间怎么清理 发布:2025-03-29 22:43:59 浏览:958
tv之家密码是多少 发布:2025-03-29 22:43:50 浏览:322
lol脚本连招 发布:2025-03-29 22:09:58 浏览:789
楚留香电脑服务器与手机一致吗 发布:2025-03-29 22:05:41 浏览:648
压缩小包 发布:2025-03-29 21:59:11 浏览:737
360的密码保护一般在哪里 发布:2025-03-29 21:49:23 浏览:53
net数据库测试 发布:2025-03-29 21:35:55 浏览:539