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

熱點內容
ug編程教學 發布:2025-03-29 08:06:29 瀏覽:899
三星note3存儲空間不足 發布:2025-03-29 08:02:10 瀏覽:911
安卓版怎麼關聯微信 發布:2025-03-29 07:54:32 瀏覽:714
麥芒6恢復出廠密碼是多少求回答 發布:2025-03-29 07:47:31 瀏覽:468
如何實現靜態頁面綁定伺服器 發布:2025-03-29 07:44:28 瀏覽:696
冒險島私服源碼 發布:2025-03-29 07:37:53 瀏覽:228
文件壓縮比 發布:2025-03-29 07:32:45 瀏覽:742
飛花逐月伺服器什麼時候開的 發布:2025-03-29 07:31:14 瀏覽:760
ef從資料庫更新 發布:2025-03-29 07:31:11 瀏覽:823
按鍵c語言單片機 發布:2025-03-29 07:29:07 瀏覽:589