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

热点内容
rar解压软件下载formac 发布:2025-07-11 15:41:08 浏览:851
wap源码论坛 发布:2025-07-11 15:33:56 浏览:291
什么是永恒流量密码 发布:2025-07-11 15:31:08 浏览:767
离线存储器 发布:2025-07-11 15:29:22 浏览:662
asynctask上传 发布:2025-07-11 15:20:17 浏览:590
编程语言的图标 发布:2025-07-11 15:18:04 浏览:417
分式编译器 发布:2025-07-11 15:15:05 浏览:71
烤生蚝的调料怎么配置 发布:2025-07-11 15:15:02 浏览:550
优酷视频上传分辨率 发布:2025-07-11 15:15:00 浏览:603
超时代加密提取工具 发布:2025-07-11 15:13:37 浏览:962