{"id":233826,"student_id":10,"content":"setBackdrop(\"bg.png\");\nlet t1 = createSprite(\"red.png\", \"green.png\", \"blue.png\", \"black_0.png\", \"black_1.png\");\nlet t2 = createSprite(\"red.png\", \"green.png\", \"blue.png\", \"black_0.png\", \"black_1.png\");\nlet t3 = createSprite(\"red.png\", \"green.png\", \"blue.png\", \"black_0.png\", \"black_1.png\");\nlet t4 = createSprite(\"red.png\", \"green.png\", \"blue.png\", \"black_0.png\", \"black_1.png\");\nlet t5 = createSprite(\"red.png\", \"green.png\", \"blue.png\", \"black_0.png\", \"black_1.png\");\nlet t6 = createSprite(\"red.png\", \"green.png\", \"blue.png\", \"black_0.png\", \"black_1.png\");\nlet tongueR = createSprite(\"tongue_r_0.png\", \"tongue_r_1.png\");\nlet tongueG = createSprite(\"tongue_g_0.png\", \"tongue_g_1.png\");\nlet tongueB = createSprite(\"tongue_b_0.png\", \"tongue_b_1.png\");\nlet frogR = createSprite(\"frog_0.png\", \"frog_1.png\");\nlet frogG = createSprite(\"frog_0.png\", \"frog_1.png\");\nlet frogB = createSprite(\"frog_0.png\", \"frog_1.png\");\nlet info = createSprite(\"info.png\");\n\nlet vy_r = 0;\nlet vy_g = 0;\nlet vy_b = 0;\nlet score = 0;\nlet clock = 0;\n\nt1.moveTo(0 - 120 + 1200, 200);\nt2.moveTo(240 - 120 + 1200, 200);\nt3.moveTo(480 - 120 + 1200, 200);\nt4.moveTo(720 - 120 + 1200, 200);\nt5.moveTo(960 - 120 + 1200, 200);\nt6.moveTo(1200 - 120 + 1200, 200);\ntongueR.moveTo(240 - 120, 700);\ntongueG.moveTo(480 - 120, 700);\ntongueB.moveTo(720 - 120, 700);\nfrogR.moveTo(240 - 120, 450);\nfrogG.moveTo(480 - 120, 450);\nfrogB.moveTo(720 - 120, 450);\n\ncreateSound('bgm.mp3');\n\nfunction gameloop () {\n if (info.hidden) {\n clock++;\n tongueR.y += vy_r;\n tongueG.y += vy_g;\n tongueB.y += vy_b;\n if (tongueR.y \u003c 200) vy_r = 40;\n if (tongueG.y \u003c 200) vy_g = 40;\n if (tongueB.y \u003c 200) vy_b = 40;\n if (tongueR.y \u003e 700) {\n tongueR.y = 700;\n tongueR.costumeId = 0;\n }\n if (tongueG.y \u003e 700) {\n tongueG.y = 700;\n tongueG.costumeId = 0;\n }\n if (tongueB.y \u003e 700) {\n tongueB.y = 700;\n tongueB.costumeId = 0;\n }\n if (key.q \u0026\u0026 tongueR.y == 700) {\n vy_r = -40;\n createSound('effect.mp3');\n }\n if (key.w \u0026\u0026 tongueG.y == 700) {\n vy_g = -40;\n createSound('effect.mp3');\n }\n if (key.e \u0026\u0026 tongueB.y == 700) {\n vy_b = -40;\n createSound('effect.mp3');\n }\n \n updateTarget(t1);\n updateTarget(t2);\n updateTarget(t3);\n updateTarget(t4);\n updateTarget(t5);\n updateTarget(t6);\n \n timer = 60 - Math.floor(clock / 60);\n if (timer \u003c= 0) stop();\n print('捕捉成功: ' + score, 740, 720, 'white', 50);\n print('剩餘時間: ' + timer, 740, 820, 'white', 50);\n }\n \n if (cursor.isDown) info.hidden = true;\n}\n\nfunction updateTarget(target) {\n if (clock % 45 \u003c 30) {\n target.x -= 8;\n }\n\n if (target.x \u003c= 0) {\n target.x += 240 * 6;\n target.costumeId = Math.floor(Math.random()*4)\n target.hidden = false;\n }\n\n if (target.costumeId == 0 \u0026\u0026 target.touched(tongueR)) {\n target.hidden = true;\n tongueR.costumeId = 1;\n score++;\n }\n\n if (target.costumeId == 1 \u0026\u0026 target.touched(tongueG)) {\n target.hidden = true;\n tongueG.costumeId = 1;\n score++;\n }\n\n if (target.costumeId == 2 \u0026\u0026 target.touched(tongueB)) {\n target.hidden = true;\n tongueB.costumeId = 1;\n score++;\n }\n \n if (target.costumeId == 3) {\n if (target.touched(tongueR)) {\n frogR.costumeId = 1;\n target.costumeId = 4;\n stop();\n }\n if (target.touched(tongueG)) {\n frogG.costumeId = 1;\n target.costumeId = 4;\n stop();\n }\n if (target.touched(tongueB)) {\n frogB.costumeId = 1;\n target.costumeId = 4;\n stop();\n }\n }\n}\n\nforever(gameloop)","created_at":"2021-03-11T11:02:31.094+08:00","updated_at":"2021-03-11T15:55:53.993+08:00","name":"青蛙吃蚊子","language":"javascript","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/233826/e4bff29bd70acbd83c3a29633ca9ab7b.jpg"},"parent_id":233766,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":196,"hashid":"qmds8v9vp","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4220395,"file_name":"green.png","project_id":233826,"asset_id":324095,"created_at":"2021-03-11T12:34:30.229+08:00","updated_at":"2021-03-11T12:34:30.229+08:00"},{"id":4220394,"file_name":"blue.png","project_id":233826,"asset_id":324094,"created_at":"2021-03-11T12:34:30.227+08:00","updated_at":"2021-03-11T12:34:30.227+08:00"},{"id":4220404,"file_name":"info.png","project_id":233826,"asset_id":324104,"created_at":"2021-03-11T13:10:59.635+08:00","updated_at":"2021-03-11T13:10:59.635+08:00"},{"id":4220389,"file_name":"black_0.png","project_id":233826,"asset_id":324089,"created_at":"2021-03-11T12:20:51.326+08:00","updated_at":"2021-03-11T12:20:51.326+08:00"},{"id":4220390,"file_name":"black_1.png","project_id":233826,"asset_id":324090,"created_at":"2021-03-11T12:20:51.328+08:00","updated_at":"2021-03-11T12:20:51.328+08:00"},{"id":4220396,"file_name":"red.png","project_id":233826,"asset_id":324096,"created_at":"2021-03-11T12:34:30.753+08:00","updated_at":"2021-03-11T12:34:30.753+08:00"},{"id":4220399,"file_name":"tongue_g_0.png","project_id":233826,"asset_id":324099,"created_at":"2021-03-11T12:46:50.256+08:00","updated_at":"2021-03-11T12:46:50.256+08:00"},{"id":4220400,"file_name":"tongue_g_1.png","project_id":233826,"asset_id":324100,"created_at":"2021-03-11T12:46:50.257+08:00","updated_at":"2021-03-11T12:46:50.257+08:00"},{"id":4220401,"file_name":"tongue_r_0.png","project_id":233826,"asset_id":324101,"created_at":"2021-03-11T12:46:50.769+08:00","updated_at":"2021-03-11T12:46:50.769+08:00"},{"id":4220402,"file_name":"tongue_r_1.png","project_id":233826,"asset_id":324102,"created_at":"2021-03-11T12:46:50.770+08:00","updated_at":"2021-03-11T12:46:50.770+08:00"},{"id":4220448,"file_name":"effect.mp3","project_id":233826,"asset_id":324107,"created_at":"2021-03-11T14:43:36.116+08:00","updated_at":"2021-03-11T14:43:36.116+08:00"},{"id":4220387,"file_name":"frog_0.png","project_id":233826,"asset_id":324087,"created_at":"2021-03-11T12:06:56.631+08:00","updated_at":"2021-03-11T12:06:56.631+08:00"},{"id":4220388,"file_name":"frog_1.png","project_id":233826,"asset_id":324088,"created_at":"2021-03-11T12:06:56.633+08:00","updated_at":"2021-03-11T12:06:56.633+08:00"},{"id":4220397,"file_name":"tongue_b_0.png","project_id":233826,"asset_id":324097,"created_at":"2021-03-11T12:46:49.718+08:00","updated_at":"2021-03-11T12:46:49.718+08:00"},{"id":4220398,"file_name":"tongue_b_1.png","project_id":233826,"asset_id":324098,"created_at":"2021-03-11T12:46:49.720+08:00","updated_at":"2021-03-11T12:46:49.720+08:00"},{"id":4220447,"file_name":"bgm.mp3","project_id":233826,"asset_id":324106,"created_at":"2021-03-11T14:37:37.403+08:00","updated_at":"2021-03-11T14:37:37.403+08:00"},{"id":4220403,"file_name":"bg.png","project_id":233826,"asset_id":324103,"created_at":"2021-03-11T13:00:14.363+08:00","updated_at":"2021-03-11T13:00:14.363+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦