當前位置:首頁 » 操作系統 » 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。

熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:645
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:936
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:632
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:821
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:731
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:1066
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:299
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:160
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:851
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:763