{"id":326306,"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 info = createSprite(\"info.png\");\n\nlet count = 0; // 紀錄吃了多少碗\nlet timer = 30; // 約 30 秒遊戲時間\nlet type = 0; // 當前拉麵種類\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', true);\n\n// 遊戲迴圈\nfunction gameloop () {\n drawText(Math.floor(timer), 260, 90, 'white', 100); //顯示剩餘時間\n \n if (ramen.costumeId == 6) {\n ramen.moveTo(cursor);\n }\n \n if (info.hidden == true) {\n timer -= 1/60;\n }\n \n if (timer \u003c 0) {\n createSprite('board.png');\n drawText(count, 890, 480, 'white', 70);\n stop();\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 \n count += type;\n \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 }\n \n info.hidden = true;\n}\n\n// 拉麵碗被點擊時\nfunction clickOnRomen () {\n if (ramen.costumeId \u003c 6) {\n 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\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\n\n","created_at":"2021-12-16T15:50:13.125+08:00","updated_at":"2021-12-17T12:28:05.291+08:00","name":"拉麵大胃王(預設版)","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/326306/b230fa3bcc0fafe3f75ee57f07ce202f.jpg"},"parent_id":2,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":258,"hashid":"npms3vw2k","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":6856045,"file_name":"s0.png","project_id":326306,"asset_id":450931,"created_at":"2021-12-16T16:24:34.940+08:00","updated_at":"2021-12-16T16:24:34.940+08:00"},{"id":6856046,"file_name":"board.png","project_id":326306,"asset_id":450932,"created_at":"2021-12-16T16:24:34.944+08:00","updated_at":"2021-12-16T16:24:34.944+08:00"},{"id":6856019,"file_name":"f6.png","project_id":326306,"asset_id":450905,"created_at":"2021-12-16T16:24:34.756+08:00","updated_at":"2021-12-16T16:24:34.756+08:00"},{"id":6856020,"file_name":"order_1.png","project_id":326306,"asset_id":450906,"created_at":"2021-12-16T16:24:34.761+08:00","updated_at":"2021-12-16T16:24:34.761+08:00"},{"id":6856021,"file_name":"order_2.png","project_id":326306,"asset_id":450907,"created_at":"2021-12-16T16:24:34.765+08:00","updated_at":"2021-12-16T16:24:34.765+08:00"},{"id":6856022,"file_name":"order_3.png","project_id":326306,"asset_id":450908,"created_at":"2021-12-16T16:24:34.770+08:00","updated_at":"2021-12-16T16:24:34.770+08:00"},{"id":6856023,"file_name":"bg_3.png","project_id":326306,"asset_id":450909,"created_at":"2021-12-16T16:24:34.774+08:00","updated_at":"2021-12-16T16:24:34.774+08:00"},{"id":6856024,"file_name":"f0.png","project_id":326306,"asset_id":450910,"created_at":"2021-12-16T16:24:34.779+08:00","updated_at":"2021-12-16T16:24:34.779+08:00"},{"id":6856025,"file_name":"info.png","project_id":326306,"asset_id":450911,"created_at":"2021-12-16T16:24:34.785+08:00","updated_at":"2021-12-16T16:24:34.785+08:00"},{"id":6856026,"file_name":"f5.png","project_id":326306,"asset_id":450912,"created_at":"2021-12-16T16:24:34.789+08:00","updated_at":"2021-12-16T16:24:34.789+08:00"},{"id":6856027,"file_name":"f4.png","project_id":326306,"asset_id":450913,"created_at":"2021-12-16T16:24:34.793+08:00","updated_at":"2021-12-16T16:24:34.793+08:00"},{"id":6856028,"file_name":"f3.png","project_id":326306,"asset_id":450914,"created_at":"2021-12-16T16:24:34.798+08:00","updated_at":"2021-12-16T16:24:34.798+08:00"},{"id":6856029,"file_name":"f2.png","project_id":326306,"asset_id":450915,"created_at":"2021-12-16T16:24:34.802+08:00","updated_at":"2021-12-16T16:24:34.802+08:00"},{"id":6856030,"file_name":"f1.png","project_id":326306,"asset_id":450916,"created_at":"2021-12-16T16:24:34.806+08:00","updated_at":"2021-12-16T16:24:34.806+08:00"},{"id":6856031,"file_name":"bg.png","project_id":326306,"asset_id":450917,"created_at":"2021-12-16T16:24:34.811+08:00","updated_at":"2021-12-16T16:24:34.811+08:00"},{"id":6856032,"file_name":"bgm.mp3","project_id":326306,"asset_id":450918,"created_at":"2021-12-16T16:24:34.878+08:00","updated_at":"2021-12-16T16:24:34.878+08:00"},{"id":6856033,"file_name":"eat.mp3","project_id":326306,"asset_id":450919,"created_at":"2021-12-16T16:24:34.883+08:00","updated_at":"2021-12-16T16:24:34.883+08:00"},{"id":6856034,"file_name":"drop.mp3","project_id":326306,"asset_id":450920,"created_at":"2021-12-16T16:24:34.887+08:00","updated_at":"2021-12-16T16:24:34.887+08:00"},{"id":6856035,"file_name":"s10.png","project_id":326306,"asset_id":450921,"created_at":"2021-12-16T16:24:34.892+08:00","updated_at":"2021-12-16T16:24:34.892+08:00"},{"id":6856036,"file_name":"s9.png","project_id":326306,"asset_id":450922,"created_at":"2021-12-16T16:24:34.896+08:00","updated_at":"2021-12-16T16:24:34.896+08:00"},{"id":6856037,"file_name":"s8.png","project_id":326306,"asset_id":450923,"created_at":"2021-12-16T16:24:34.900+08:00","updated_at":"2021-12-16T16:24:34.900+08:00"},{"id":6856038,"file_name":"s7.png","project_id":326306,"asset_id":450924,"created_at":"2021-12-16T16:24:34.904+08:00","updated_at":"2021-12-16T16:24:34.904+08:00"},{"id":6856039,"file_name":"s6.png","project_id":326306,"asset_id":450925,"created_at":"2021-12-16T16:24:34.908+08:00","updated_at":"2021-12-16T16:24:34.908+08:00"},{"id":6856040,"file_name":"s5.png","project_id":326306,"asset_id":450926,"created_at":"2021-12-16T16:24:34.912+08:00","updated_at":"2021-12-16T16:24:34.912+08:00"},{"id":6856041,"file_name":"s4.png","project_id":326306,"asset_id":450927,"created_at":"2021-12-16T16:24:34.925+08:00","updated_at":"2021-12-16T16:24:34.925+08:00"},{"id":6856042,"file_name":"s3.png","project_id":326306,"asset_id":450928,"created_at":"2021-12-16T16:24:34.929+08:00","updated_at":"2021-12-16T16:24:34.929+08:00"},{"id":6856043,"file_name":"s2.png","project_id":326306,"asset_id":450929,"created_at":"2021-12-16T16:24:34.933+08:00","updated_at":"2021-12-16T16:24:34.933+08:00"},{"id":6856044,"file_name":"s1.png","project_id":326306,"asset_id":450930,"created_at":"2021-12-16T16:24:34.936+08:00","updated_at":"2021-12-16T16:24:34.936+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦