{"id":117896,"student_id":10,"content":"setBackdrop('bg.jpg');\nlet pans = [];\nlet score = 0;\nlet can = createSprite('can.png');\nlet koding = createSprite(['k1.png', 'k2.png', 'k3.png', 'k4.png', 'k5.png', 'k6.png', 'k7.png']);\nlet hand = createSprite(['s0.png', 's1.png', 's2.png', 's3.png']);\nlet box = createSprite(['0.png', '1.png', '2.png', '3.png', '4.png', '5.png']);\nlet boxs = createSprite(['00.png', '10.png', '20.png', '30.png', '40.png', '50.png', '60.png']);\nlet bgm = sound.play('bgm.mp3', true);\nlet cook = sound.play('cook.ogg', true);\n\nbox.scale = 1.4;\n\nbox.x = 500;\nbox.y = 280;\ncan.x = 50;\ncan.y = 430;\nhand.layer = 1;\nboxs.y = 430;\nkoding.x = 500;\nkoding.y = 100;\n\n\nforever(loop);\ncan.on('click', clickTrashCan);\nbox.on('click', clickBox);\nsetTimeout(gameover, 60000);\n\n\nfor (let x = 0; x \u003c 3; x++) {\n for (let y = 0; y \u003c 3; y++) {\n let s = createSprite(['p0.png', 'p1.png', 'p2.png', 'p3.png', 'p4.png']);\n s.x = 100 + x*100;\n s.y = 100 + y*100;\n pans.push(s);\n\n s.on(\"click\", function() {\n if (hand.costumeId != 2 \u0026\u0026 hand.costumeId != 3) {\n if (s.costumeId == 0) {\n s.costumeId = 1;\n s.timer = 500 + Math.random()*100;\n }\n if (s.costumeId == 3) {\n s.costumeId = 0;\n s.timer = Infinity;\n hand.costumeId = 2;\n\n }\n if (s.costumeId == 4) {\n s.costumeId = 0;\n s.timer = Infinity;\n hand.costumeId = 3;\n }\n }\n });\n }\n}\n\nfunction clickTrashCan () {\n if (hand.costumeId == 2 || hand.costumeId == 3) {\n hand.costumeId = 0;\n sound.play('remove.ogg');\n }\n}\n\nfunction clickBox () {\n if (hand.costumeId == 2) {\n hand.costumeId = 0;\n sound.play('drop.wav');\n score++;\n }\n}\n\nfunction loop () {\n let isCooking = false;\n box.costumeId = score%6;\n boxs.costumeId = Math.floor(score/6);\n koding.costumeId = Math.floor(score/6);\n hand.moveTo(cursor);\n pans.forEach(function (p) {\n if (p.costumeId != 0) {\n p.timer--;\n }\n if (p.timer \u003c 400) {\n p.costumeId = 2;\n }\n if (p.timer \u003c 200) {\n p.costumeId = 3;\n }\n if (p.timer \u003c 0) {\n p.costumeId = 4;\n }\n if (hand.costumeId != 2 \u0026\u0026 hand.costumeId != 3 \u0026\u0026 hand.touched(p)) {\n if (p.costumeId == 0) {\n hand.costumeId = 0;\n } else {\n hand.costumeId = 1;\n }\n }\n if (p.costumeId != 0) {\n isCooking = true;\n }\n });\n \n cook.mute(!isCooking);\n}\n\nfunction gameover () {\n setBackdrop(\"black\");\n stop();\n}","created_at":"2019-12-30T16:11:12.318+08:00","updated_at":"2020-06-15T14:44:01.231+08:00","name":"燒烤章魚小丸子(概念版) ","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/117896/74a58af37a5fd69be5b8dad599d78a19.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":264,"hashid":"yeysnjrq","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2021991,"file_name":"00.png","project_id":117896,"asset_id":175932,"created_at":"2019-12-31T09:18:01.697+08:00","updated_at":"2019-12-31T09:18:01.697+08:00"},{"id":2021966,"file_name":"p1.png","project_id":117896,"asset_id":175918,"created_at":"2019-12-30T21:24:38.269+08:00","updated_at":"2019-12-30T21:24:38.269+08:00"},{"id":2021994,"file_name":"drop.wav","project_id":117896,"asset_id":175934,"created_at":"2019-12-31T09:47:35.059+08:00","updated_at":"2019-12-31T09:47:39.640+08:00"},{"id":2021998,"file_name":"bg.jpg","project_id":117896,"asset_id":175938,"created_at":"2019-12-31T10:04:40.473+08:00","updated_at":"2019-12-31T10:04:40.473+08:00"},{"id":2021993,"file_name":"cook.ogg","project_id":117896,"asset_id":175933,"created_at":"2019-12-31T09:41:03.246+08:00","updated_at":"2019-12-31T09:41:03.246+08:00"},{"id":2021957,"file_name":"s0.png","project_id":117896,"asset_id":175892,"created_at":"2019-12-30T21:07:47.696+08:00","updated_at":"2019-12-30T21:07:47.696+08:00"},{"id":2021958,"file_name":"s1.png","project_id":117896,"asset_id":175893,"created_at":"2019-12-30T21:07:47.699+08:00","updated_at":"2019-12-30T21:07:47.699+08:00"},{"id":2021959,"file_name":"s2.png","project_id":117896,"asset_id":175894,"created_at":"2019-12-30T21:07:47.972+08:00","updated_at":"2019-12-30T21:07:47.972+08:00"},{"id":2021960,"file_name":"s3.png","project_id":117896,"asset_id":175895,"created_at":"2019-12-30T21:07:47.974+08:00","updated_at":"2019-12-30T21:07:47.974+08:00"},{"id":2021955,"file_name":"p4.png","project_id":117896,"asset_id":175891,"created_at":"2019-12-30T21:07:47.419+08:00","updated_at":"2019-12-30T21:24:25.484+08:00"},{"id":2021954,"file_name":"p3.png","project_id":117896,"asset_id":175890,"created_at":"2019-12-30T21:07:47.136+08:00","updated_at":"2019-12-30T21:24:28.423+08:00"},{"id":2021953,"file_name":"p2.png","project_id":117896,"asset_id":175889,"created_at":"2019-12-30T21:07:47.132+08:00","updated_at":"2019-12-30T21:24:32.981+08:00"},{"id":2021992,"file_name":"bgm.mp3","project_id":117896,"asset_id":113696,"created_at":"2019-12-31T09:35:38.495+08:00","updated_at":"2019-12-31T09:35:43.378+08:00"},{"id":2021963,"file_name":"can.png","project_id":117896,"asset_id":175913,"created_at":"2019-12-30T21:13:18.571+08:00","updated_at":"2019-12-30T21:13:18.571+08:00"},{"id":2021995,"file_name":"remove.ogg","project_id":117896,"asset_id":175935,"created_at":"2019-12-31T09:52:53.678+08:00","updated_at":"2019-12-31T09:53:01.223+08:00"},{"id":2021952,"file_name":"p0.png","project_id":117896,"asset_id":175888,"created_at":"2019-12-30T21:07:46.904+08:00","updated_at":"2019-12-30T21:07:46.904+08:00"},{"id":2047498,"file_name":"5.png","project_id":117896,"asset_id":177418,"created_at":"2020-01-06T09:15:44.268+08:00","updated_at":"2020-01-06T09:15:44.268+08:00"},{"id":2047499,"file_name":"6.png","project_id":117896,"asset_id":177419,"created_at":"2020-01-06T09:15:44.270+08:00","updated_at":"2020-01-06T09:15:44.270+08:00"},{"id":2047502,"file_name":"30.png","project_id":117896,"asset_id":177422,"created_at":"2020-01-06T09:15:45.284+08:00","updated_at":"2020-01-06T09:15:45.284+08:00"},{"id":2047503,"file_name":"40.png","project_id":117896,"asset_id":177423,"created_at":"2020-01-06T09:15:45.287+08:00","updated_at":"2020-01-06T09:15:45.287+08:00"},{"id":2047492,"file_name":"0.png","project_id":117896,"asset_id":177412,"created_at":"2020-01-06T09:15:42.851+08:00","updated_at":"2020-01-06T09:15:42.851+08:00"},{"id":2047493,"file_name":"00.png","project_id":117896,"asset_id":177413,"created_at":"2020-01-06T09:15:42.853+08:00","updated_at":"2020-01-06T09:15:42.853+08:00"},{"id":2047494,"file_name":"1.png","project_id":117896,"asset_id":177414,"created_at":"2020-01-06T09:15:43.321+08:00","updated_at":"2020-01-06T09:15:43.321+08:00"},{"id":2047495,"file_name":"2.png","project_id":117896,"asset_id":177415,"created_at":"2020-01-06T09:15:43.323+08:00","updated_at":"2020-01-06T09:15:43.323+08:00"},{"id":2047508,"file_name":"k3.png","project_id":117896,"asset_id":177430,"created_at":"2020-01-06T09:38:11.025+08:00","updated_at":"2020-01-06T09:38:11.025+08:00"},{"id":2047509,"file_name":"k4.png","project_id":117896,"asset_id":177431,"created_at":"2020-01-06T09:38:11.027+08:00","updated_at":"2020-01-06T09:38:11.027+08:00"},{"id":2047510,"file_name":"k5.png","project_id":117896,"asset_id":177432,"created_at":"2020-01-06T09:38:11.700+08:00","updated_at":"2020-01-06T09:38:11.700+08:00"},{"id":2047511,"file_name":"k6.png","project_id":117896,"asset_id":177433,"created_at":"2020-01-06T09:38:11.702+08:00","updated_at":"2020-01-06T09:38:11.702+08:00"},{"id":2047506,"file_name":"k1.png","project_id":117896,"asset_id":177428,"created_at":"2020-01-06T09:38:09.523+08:00","updated_at":"2020-01-06T09:38:09.523+08:00"},{"id":2047507,"file_name":"k2.png","project_id":117896,"asset_id":177429,"created_at":"2020-01-06T09:38:09.525+08:00","updated_at":"2020-01-06T09:38:09.525+08:00"},{"id":2047512,"file_name":"k7.png","project_id":117896,"asset_id":177434,"created_at":"2020-01-06T09:38:12.163+08:00","updated_at":"2020-01-06T09:38:12.163+08:00"},{"id":2047496,"file_name":"3.png","project_id":117896,"asset_id":177416,"created_at":"2020-01-06T09:15:43.790+08:00","updated_at":"2020-01-06T09:15:43.790+08:00"},{"id":2047497,"file_name":"4.png","project_id":117896,"asset_id":177417,"created_at":"2020-01-06T09:15:43.792+08:00","updated_at":"2020-01-06T09:15:43.792+08:00"},{"id":2047504,"file_name":"50.png","project_id":117896,"asset_id":177424,"created_at":"2020-01-06T09:15:46.133+08:00","updated_at":"2020-01-06T09:15:46.133+08:00"},{"id":2047505,"file_name":"60.png","project_id":117896,"asset_id":177425,"created_at":"2020-01-06T09:15:46.136+08:00","updated_at":"2020-01-06T09:15:46.136+08:00"},{"id":2047500,"file_name":"10.png","project_id":117896,"asset_id":177420,"created_at":"2020-01-06T09:15:44.774+08:00","updated_at":"2020-01-06T09:15:44.774+08:00"},{"id":2047501,"file_name":"20.png","project_id":117896,"asset_id":177421,"created_at":"2020-01-06T09:15:44.776+08:00","updated_at":"2020-01-06T09:15:44.776+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦