{"id":315400,"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 = 1800; // 約 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\ncreateSound('bgm.mp3');\n\n// 遊戲迴圈\nfunction gameloop () {\n \n // 空碗造型時才會隨著滑鼠移動\n if (ramen.costumeId == 6) {\n ramen.moveTo(cursor);\n }\n if (info.hidden) {\n timer -= 1;\n drawText(Math.floor(timer / 60), 260, 90, 'white', 100);\n }\n \n if (timer \u003c= 0) {\n board.hidden = false;\n drawText(count, 890, 480, 'white', 70);\n stop();\n }\n \n // 菜單特效\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// 遊戲場景任意處被點擊時\nfunction stageOnClick () {\n if (ramen.x \u003e 480 \u0026\u0026 ramen.y \u003e 450) {\n ramen.hidden = true;\n count += type;\n if (count \u003c= 10) {\n stacksA.costumeId = count;\n }\n else if (count \u003c= 20) {\n stacksA.costumeId = 10;\n stacksB.costumeId = count - 10;\n }\n else if (count \u003c= 30) {\n stacksB.costumeId = 10;\n stacksC.costumeId = count - 20;\n }\n createSound('drop.mp3');\n }\n\n info.hidden = true;\n}\n\n// 拉麵碗被點擊時\nfunction clickOnRoman () {\n if (ramen.costumeId \u003c 6) {\n if (type == 1) ramen.costumeId += 3;\n if (type == 2) ramen.costumeId += 2;\n if (type == 3) 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 type = 1;\n createSound('drop.mp3');\n}\n\n// 菜單 2 被點擊時\nfunction clickOnOrderB() {\n ramen.hidden = false;\n ramen.costumeId = 0;\n ramen.moveTo(240, 450);\n type = 2;\n createSound('drop.mp3');\n}\n\n// 菜單 3 被點擊時\nfunction clickOnOrderC() {\n ramen.hidden = false;\n ramen.costumeId = 0;\n ramen.moveTo(240, 450);\n type = 3;\n createSound('drop.mp3');\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', clickOnRoman); // 當拉麵被點擊時\n\n\n","created_at":"2021-11-18T11:05:42.429+08:00","updated_at":"2022-12-10T00:07:42.398+08:00","name":"拉麵大胃王(完整版)","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/315400/623a66b57048926fe900fe0f2aa486f0.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":159,"hashid":"36ysm9mjm","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":9252716,"file_name":"board.png","project_id":315400,"asset_id":542275,"created_at":"2022-07-29T14:43:45.484+08:00","updated_at":"2022-07-29T14:43:45.484+08:00"},{"id":9252717,"file_name":"s0.png","project_id":315400,"asset_id":542276,"created_at":"2022-07-29T14:43:45.488+08:00","updated_at":"2022-07-29T14:43:45.488+08:00"},{"id":9252718,"file_name":"s1.png","project_id":315400,"asset_id":542277,"created_at":"2022-07-29T14:43:45.493+08:00","updated_at":"2022-07-29T14:43:45.493+08:00"},{"id":9252719,"file_name":"s2.png","project_id":315400,"asset_id":542278,"created_at":"2022-07-29T14:43:45.497+08:00","updated_at":"2022-07-29T14:43:45.497+08:00"},{"id":9252720,"file_name":"s3.png","project_id":315400,"asset_id":542279,"created_at":"2022-07-29T14:43:45.501+08:00","updated_at":"2022-07-29T14:43:45.501+08:00"},{"id":9252721,"file_name":"s4.png","project_id":315400,"asset_id":542280,"created_at":"2022-07-29T14:43:45.505+08:00","updated_at":"2022-07-29T14:43:45.505+08:00"},{"id":9252722,"file_name":"s5.png","project_id":315400,"asset_id":542281,"created_at":"2022-07-29T14:43:45.509+08:00","updated_at":"2022-07-29T14:43:45.509+08:00"},{"id":9252723,"file_name":"s6.png","project_id":315400,"asset_id":542282,"created_at":"2022-07-29T14:43:45.513+08:00","updated_at":"2022-07-29T14:43:45.513+08:00"},{"id":9252724,"file_name":"s7.png","project_id":315400,"asset_id":542283,"created_at":"2022-07-29T14:43:45.517+08:00","updated_at":"2022-07-29T14:43:45.517+08:00"},{"id":9252725,"file_name":"s8.png","project_id":315400,"asset_id":542284,"created_at":"2022-07-29T14:43:45.521+08:00","updated_at":"2022-07-29T14:43:45.521+08:00"},{"id":9252726,"file_name":"s9.png","project_id":315400,"asset_id":542285,"created_at":"2022-07-29T14:43:45.524+08:00","updated_at":"2022-07-29T14:43:45.524+08:00"},{"id":9252727,"file_name":"s10.png","project_id":315400,"asset_id":542286,"created_at":"2022-07-29T14:43:45.528+08:00","updated_at":"2022-07-29T14:43:45.528+08:00"},{"id":9252728,"file_name":"drop.mp3","project_id":315400,"asset_id":542287,"created_at":"2022-07-29T14:43:45.532+08:00","updated_at":"2022-07-29T14:43:45.532+08:00"},{"id":9252729,"file_name":"eat.mp3","project_id":315400,"asset_id":542288,"created_at":"2022-07-29T14:43:45.536+08:00","updated_at":"2022-07-29T14:43:45.536+08:00"},{"id":9252730,"file_name":"bgm.mp3","project_id":315400,"asset_id":542289,"created_at":"2022-07-29T14:43:45.593+08:00","updated_at":"2022-07-29T14:43:45.593+08:00"},{"id":9252731,"file_name":"bg.png","project_id":315400,"asset_id":542290,"created_at":"2022-07-29T14:43:45.598+08:00","updated_at":"2022-07-29T14:43:45.598+08:00"},{"id":9252732,"file_name":"f1.png","project_id":315400,"asset_id":542291,"created_at":"2022-07-29T14:43:45.602+08:00","updated_at":"2022-07-29T14:43:45.602+08:00"},{"id":9252733,"file_name":"f2.png","project_id":315400,"asset_id":542292,"created_at":"2022-07-29T14:43:45.606+08:00","updated_at":"2022-07-29T14:43:45.606+08:00"},{"id":9252734,"file_name":"f3.png","project_id":315400,"asset_id":542293,"created_at":"2022-07-29T14:43:45.610+08:00","updated_at":"2022-07-29T14:43:45.610+08:00"},{"id":9252735,"file_name":"f4.png","project_id":315400,"asset_id":542294,"created_at":"2022-07-29T14:43:45.614+08:00","updated_at":"2022-07-29T14:43:45.614+08:00"},{"id":9252736,"file_name":"f5.png","project_id":315400,"asset_id":542295,"created_at":"2022-07-29T14:43:45.618+08:00","updated_at":"2022-07-29T14:43:45.618+08:00"},{"id":9252737,"file_name":"info.png","project_id":315400,"asset_id":542296,"created_at":"2022-07-29T14:43:45.623+08:00","updated_at":"2022-07-29T14:43:45.623+08:00"},{"id":9252738,"file_name":"f0.png","project_id":315400,"asset_id":542297,"created_at":"2022-07-29T14:43:45.642+08:00","updated_at":"2022-07-29T14:43:45.642+08:00"},{"id":9252739,"file_name":"bg_3.png","project_id":315400,"asset_id":542298,"created_at":"2022-07-29T14:43:45.646+08:00","updated_at":"2022-07-29T14:43:45.646+08:00"},{"id":9252740,"file_name":"order_3.png","project_id":315400,"asset_id":542299,"created_at":"2022-07-29T14:43:45.650+08:00","updated_at":"2022-07-29T14:43:45.650+08:00"},{"id":9252741,"file_name":"order_2.png","project_id":315400,"asset_id":542300,"created_at":"2022-07-29T14:43:45.654+08:00","updated_at":"2022-07-29T14:43:45.654+08:00"},{"id":9252742,"file_name":"order_1.png","project_id":315400,"asset_id":542301,"created_at":"2022-07-29T14:43:45.657+08:00","updated_at":"2022-07-29T14:43:45.657+08:00"},{"id":9252743,"file_name":"f6.png","project_id":315400,"asset_id":542302,"created_at":"2022-07-29T14:43:45.661+08:00","updated_at":"2022-07-29T14:43:45.661+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦