当前位置:首页 » 操作系统 » 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-07-12 13:31:49 浏览:438
苹果保存账号密码在哪里找 发布:2025-07-12 13:31:07 浏览:98
东北大学c语言考试题 发布:2025-07-12 13:26:40 浏览:755
sha256在线加密 发布:2025-07-12 13:19:06 浏览:227
vbnet创建数据库连接 发布:2025-07-12 13:15:34 浏览:232
为什么社保卡在社康还要密码 发布:2025-07-12 13:11:42 浏览:811
取随机数php 发布:2025-07-12 12:58:16 浏览:840
如何配置组合音响 发布:2025-07-12 12:53:54 浏览:93
c语言幂计算 发布:2025-07-12 12:52:36 浏览:566
兔费WLAN密码多少 发布:2025-07-12 12:50:59 浏览:861