{"id":413435,"student_id":10,"content":"setBackdrop('bg.png'); //設定背景圖\nlet orderA = createSprite('order_1.png'); //菜單A\nlet orderB = createSprite('order_2.png'); //菜單B\nlet orderC = createSprite('order_3.png'); //菜單C\nlet stacksA = createSprite('s0.png', 's1.png', 's2.png', 's3.png', 's4.png', 's5.png', 's6.png', 's7.png', 's8.png', 's9.png', 's10.png');\nlet stacksB = createSprite('s0.png', 's1.png', 's2.png', 's3.png', 's4.png', 's5.png', 's6.png', 's7.png', 's8.png', 's9.png', 's10.png');\nlet stacksC = createSprite('s0.png', 's1.png', 's2.png', 's3.png', 's4.png', 's5.png', 's6.png', 's7.png', 's8.png', 's9.png', 's10.png');\nlet ramen = createSprite('f0.png', 'f1.png', 'f2.png', 'f3.png', 'f4.png', 'f5.png', 'f6.png');\nlet board = createSprite('board.png'); //計分板\nlet info = createSprite('info.png'); //遊戲說明\n\nlet count = 0; // 紀錄吃了多少碗\nlet timer = 30; // 約 30 秒遊戲時間\nlet type = 0; // 當前拉麵種類\n\nboard.hidden = true; // 預設隱藏計分板\nramen.hidden = true;\n\norderA.moveTo(850, 200);\norderB.moveTo(950, 200);\norderC.moveTo(1050, 200);\nstacksA.moveTo(600, 450);\nstacksB.moveTo(840, 450);\nstacksC.moveTo(1080, 450);\nramen.moveTo(240, 450);\n\n// createSound('bgm.mp3', true);\n\n// 遊戲迴圈\nfunction gameloop () {\n \n hoverEffect(); //菜單特效\n \n //如果遊戲說明圖消失\n if (info.hidden) {\n timer -= 1/60; //讓剩餘秒數減少 1/60\n drawText(Math.floor(timer), 260, 90, 'white', 100); //將剩餘秒數印出\n }\n \n //如果剩餘秒數低於 0\n if (timer \u003c= 0) {\n board.hidden = false; //顯示計分板\n drawText(count, 890, 480, 'white', 70); //印出數量\n stop(); //停止遊戲\n }\n \n if (ramen.costumeId == 6) {\n ramen.moveTo(cursor);\n }\n \n}\n\n// 遊戲場景任意處被點擊時\nfunction stageOnClick () {\n info.hidden = true; //隱藏遊戲說明圖\n \n if (ramen.x \u003e 480 \u0026\u0026 ramen.y \u003e 450 \u0026\u0026 ramen.hidden == false) {\n ramen.hidden = true;\n count = count + 1;\n updateStacks();\n }\n}\n\n// 拉麵碗被點擊時\nfunction clickOnRomen () {\n if (ramen.costumeId \u003c 6) {\n ramen.costumeId = ramen.costumeId + 1;\n createSound('eat.mp3');\n }\n}\n\n// 菜單 1 被點擊時\nfunction clickOnOrderA() {\n ramen.hidden = false;\n ramen.costumeId = 0;\n ramen.moveTo(240, 450);\n createSound('drop.mp3');\n type = 1;\n}\n\n// 菜單 2 被點擊時\nfunction clickOnOrderB() {\n ramen.hidden = false;\n ramen.costumeId = 0;\n ramen.moveTo(240, 450);\n createSound('drop.mp3');\n type = 2;\n}\n\n// 菜單 3 被點擊時\nfunction clickOnOrderC() {\n ramen.hidden = false;\n ramen.costumeId = 0;\n ramen.moveTo(240, 450);\n createSound('drop.mp3');\n type = 3;\n}\n\n// 根據碗數更新三個碗堆的造型\nfunction updateStacks() {\n if (count \u003c= 10) {\n stacksA.costumeId = count\n } else if (count \u003c= 20) {\n stacksA.costumeId = 10\n stacksB.costumeId = count - 10\n } else if (count \u003c= 30) {\n stacksB.costumeId = 10\n stacksC.costumeId = count - 20\n } else {\n stacksC.costumeId = 10;\n }\n}\n\n// 滑鼠碰到菜單的特效\nfunction hoverEffect () {\n orderA.scale = orderA.touched(cursor) ? 1.1 : 1;\n orderB.scale = orderB.touched(cursor) ? 1.1 : 1;\n orderC.scale = orderC.touched(cursor) ? 1.1 : 1;\n}\n\n\nforever(gameloop); // 不斷執行遊戲迴圈\non('click', stageOnClick); // 當遊戲場景被點擊時\norderA.on('click', clickOnOrderA); // 當菜單 A 被點擊時\norderB.on('click', clickOnOrderB); // 當菜單 B 被點擊時\norderC.on('click', clickOnOrderC); // 當菜單 C 被點擊時\nramen.on('click', clickOnRomen); // 當拉麵被點擊時\n","created_at":"2022-07-29T10:21:30.352+08:00","updated_at":"2022-12-10T00:07:27.416+08:00","name":"拉麵大胃王(完整版)","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/413435/19350ffceb947d06576d2806fda0fbad.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":134,"hashid":"jzmskkj4w","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":9252688,"file_name":"f6.png","project_id":413435,"asset_id":542227,"created_at":"2022-07-29T14:29:03.292+08:00","updated_at":"2022-07-29T14:29:03.292+08:00"},{"id":9252689,"file_name":"order_1.png","project_id":413435,"asset_id":542228,"created_at":"2022-07-29T14:29:03.298+08:00","updated_at":"2022-07-29T14:29:03.298+08:00"},{"id":9252690,"file_name":"order_2.png","project_id":413435,"asset_id":542229,"created_at":"2022-07-29T14:29:03.306+08:00","updated_at":"2022-07-29T14:29:03.306+08:00"},{"id":9252691,"file_name":"order_3.png","project_id":413435,"asset_id":542230,"created_at":"2022-07-29T14:29:03.313+08:00","updated_at":"2022-07-29T14:29:03.313+08:00"},{"id":9252692,"file_name":"bg_3.png","project_id":413435,"asset_id":542231,"created_at":"2022-07-29T14:29:03.318+08:00","updated_at":"2022-07-29T14:29:03.318+08:00"},{"id":9252693,"file_name":"f0.png","project_id":413435,"asset_id":542232,"created_at":"2022-07-29T14:29:03.322+08:00","updated_at":"2022-07-29T14:29:03.322+08:00"},{"id":9252694,"file_name":"info.png","project_id":413435,"asset_id":542233,"created_at":"2022-07-29T14:29:03.335+08:00","updated_at":"2022-07-29T14:29:03.335+08:00"},{"id":9252695,"file_name":"f5.png","project_id":413435,"asset_id":542234,"created_at":"2022-07-29T14:29:03.341+08:00","updated_at":"2022-07-29T14:29:03.341+08:00"},{"id":9252696,"file_name":"f4.png","project_id":413435,"asset_id":542235,"created_at":"2022-07-29T14:29:03.353+08:00","updated_at":"2022-07-29T14:29:03.353+08:00"},{"id":9252697,"file_name":"f3.png","project_id":413435,"asset_id":542236,"created_at":"2022-07-29T14:29:03.360+08:00","updated_at":"2022-07-29T14:29:03.360+08:00"},{"id":9252698,"file_name":"f2.png","project_id":413435,"asset_id":542237,"created_at":"2022-07-29T14:29:03.368+08:00","updated_at":"2022-07-29T14:29:03.368+08:00"},{"id":9252699,"file_name":"f1.png","project_id":413435,"asset_id":542238,"created_at":"2022-07-29T14:29:03.373+08:00","updated_at":"2022-07-29T14:29:03.373+08:00"},{"id":9252700,"file_name":"bg.png","project_id":413435,"asset_id":542239,"created_at":"2022-07-29T14:29:03.380+08:00","updated_at":"2022-07-29T14:29:03.380+08:00"},{"id":9252701,"file_name":"bgm.mp3","project_id":413435,"asset_id":542240,"created_at":"2022-07-29T14:29:03.433+08:00","updated_at":"2022-07-29T14:29:03.433+08:00"},{"id":9252702,"file_name":"eat.mp3","project_id":413435,"asset_id":542241,"created_at":"2022-07-29T14:29:03.470+08:00","updated_at":"2022-07-29T14:29:03.470+08:00"},{"id":9252703,"file_name":"drop.mp3","project_id":413435,"asset_id":542242,"created_at":"2022-07-29T14:29:03.476+08:00","updated_at":"2022-07-29T14:29:03.476+08:00"},{"id":9252704,"file_name":"s10.png","project_id":413435,"asset_id":542243,"created_at":"2022-07-29T14:29:03.480+08:00","updated_at":"2022-07-29T14:29:03.480+08:00"},{"id":9252705,"file_name":"s9.png","project_id":413435,"asset_id":542244,"created_at":"2022-07-29T14:29:03.487+08:00","updated_at":"2022-07-29T14:29:03.487+08:00"},{"id":9252706,"file_name":"s8.png","project_id":413435,"asset_id":542245,"created_at":"2022-07-29T14:29:03.494+08:00","updated_at":"2022-07-29T14:29:03.494+08:00"},{"id":9252707,"file_name":"s7.png","project_id":413435,"asset_id":542246,"created_at":"2022-07-29T14:29:03.501+08:00","updated_at":"2022-07-29T14:29:03.501+08:00"},{"id":9252708,"file_name":"s6.png","project_id":413435,"asset_id":542247,"created_at":"2022-07-29T14:29:03.507+08:00","updated_at":"2022-07-29T14:29:03.507+08:00"},{"id":9252709,"file_name":"s5.png","project_id":413435,"asset_id":542248,"created_at":"2022-07-29T14:29:03.514+08:00","updated_at":"2022-07-29T14:29:03.514+08:00"},{"id":9252710,"file_name":"s4.png","project_id":413435,"asset_id":542249,"created_at":"2022-07-29T14:29:03.520+08:00","updated_at":"2022-07-29T14:29:03.520+08:00"},{"id":9252711,"file_name":"s3.png","project_id":413435,"asset_id":542250,"created_at":"2022-07-29T14:29:03.529+08:00","updated_at":"2022-07-29T14:29:03.529+08:00"},{"id":9252712,"file_name":"s2.png","project_id":413435,"asset_id":542251,"created_at":"2022-07-29T14:29:03.536+08:00","updated_at":"2022-07-29T14:29:03.536+08:00"},{"id":9252713,"file_name":"s1.png","project_id":413435,"asset_id":542252,"created_at":"2022-07-29T14:29:03.543+08:00","updated_at":"2022-07-29T14:29:03.543+08:00"},{"id":9252714,"file_name":"s0.png","project_id":413435,"asset_id":542253,"created_at":"2022-07-29T14:29:03.550+08:00","updated_at":"2022-07-29T14:29:03.550+08:00"},{"id":9252715,"file_name":"board.png","project_id":413435,"asset_id":542254,"created_at":"2022-07-29T14:29:03.556+08:00","updated_at":"2022-07-29T14:29:03.556+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦