{"id":233834,"student_id":10,"content":"setBackdrop(\"bg.png\");\nlet t1 = createSprite(\"red.png\", \"green.png\", \"black_0.png\", \"black_1.png\");\nlet t2 = createSprite(\"red.png\", \"green.png\", \"black_0.png\", \"black_1.png\");\nlet t3 = createSprite(\"red.png\", \"green.png\", \"black_0.png\", \"black_1.png\");\nlet t4 = createSprite(\"red.png\", \"green.png\", \"black_0.png\", \"black_1.png\");\nlet t5 = createSprite(\"red.png\", \"green.png\", \"black_0.png\", \"black_1.png\");\nlet t6 = createSprite(\"red.png\", \"green.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 frogR = createSprite(\"frog_0.png\", \"frog_1.png\");\nlet frogG = createSprite(\"frog_0.png\", \"frog_1.png\");\nlet info = createSprite(\"info.png\");\n\nlet vy_r = 0;\nlet vy_g = 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);\nfrogR.moveTo(240 - 120, 450);\nfrogG.moveTo(480 - 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 if (tongueR.y \u003c 200) vy_r = 40;\n if (tongueG.y \u003c 200) vy_g = 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 (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 \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 (key.space) info.hidden = true;\n}\n\nfunction updateTarget(target) {\n if (clock % 30 \u003c 20) {\n target.x -= 12;\n }\n\n if (target.x \u003c= 0) {\n target.x += 240 * 6;\n target.costumeId = Math.floor(Math.random()*3)\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 == 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 }\n}\n\nforever(gameloop)","created_at":"2021-03-11T15:55:56.569+08:00","updated_at":"2021-03-11T16:03:38.119+08:00","name":"青蛙吃蚊子V3","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/233834/1e94501d66adab1017a14bc001d6bb98.jpg"},"parent_id":233826,"plugin":"Game.set({width: 1200, height: 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":207,"hashid":"meyswvgvr","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4220476,"file_name":"effect.mp3","project_id":233834,"asset_id":324107,"created_at":"2021-03-11T15:55:56.576+08:00","updated_at":"2021-03-11T15:55:56.576+08:00"},{"id":4220477,"file_name":"bgm.mp3","project_id":233834,"asset_id":324106,"created_at":"2021-03-11T15:55:56.577+08:00","updated_at":"2021-03-11T15:55:56.577+08:00"},{"id":4220478,"file_name":"info.png","project_id":233834,"asset_id":324104,"created_at":"2021-03-11T15:55:56.578+08:00","updated_at":"2021-03-11T15:55:56.578+08:00"},{"id":4220479,"file_name":"bg.png","project_id":233834,"asset_id":324103,"created_at":"2021-03-11T15:55:56.579+08:00","updated_at":"2021-03-11T15:55:56.579+08:00"},{"id":4220480,"file_name":"tongue_r_1.png","project_id":233834,"asset_id":324102,"created_at":"2021-03-11T15:55:56.580+08:00","updated_at":"2021-03-11T15:55:56.580+08:00"},{"id":4220481,"file_name":"tongue_r_0.png","project_id":233834,"asset_id":324101,"created_at":"2021-03-11T15:55:56.581+08:00","updated_at":"2021-03-11T15:55:56.581+08:00"},{"id":4220482,"file_name":"tongue_g_1.png","project_id":233834,"asset_id":324100,"created_at":"2021-03-11T15:55:56.582+08:00","updated_at":"2021-03-11T15:55:56.582+08:00"},{"id":4220483,"file_name":"tongue_g_0.png","project_id":233834,"asset_id":324099,"created_at":"2021-03-11T15:55:56.582+08:00","updated_at":"2021-03-11T15:55:56.582+08:00"},{"id":4220484,"file_name":"tongue_b_1.png","project_id":233834,"asset_id":324098,"created_at":"2021-03-11T15:55:56.583+08:00","updated_at":"2021-03-11T15:55:56.583+08:00"},{"id":4220485,"file_name":"tongue_b_0.png","project_id":233834,"asset_id":324097,"created_at":"2021-03-11T15:55:56.584+08:00","updated_at":"2021-03-11T15:55:56.584+08:00"},{"id":4220486,"file_name":"red.png","project_id":233834,"asset_id":324096,"created_at":"2021-03-11T15:55:56.585+08:00","updated_at":"2021-03-11T15:55:56.585+08:00"},{"id":4220487,"file_name":"green.png","project_id":233834,"asset_id":324095,"created_at":"2021-03-11T15:55:56.586+08:00","updated_at":"2021-03-11T15:55:56.586+08:00"},{"id":4220488,"file_name":"blue.png","project_id":233834,"asset_id":324094,"created_at":"2021-03-11T15:55:56.587+08:00","updated_at":"2021-03-11T15:55:56.587+08:00"},{"id":4220489,"file_name":"black_1.png","project_id":233834,"asset_id":324090,"created_at":"2021-03-11T15:55:56.588+08:00","updated_at":"2021-03-11T15:55:56.588+08:00"},{"id":4220490,"file_name":"black_0.png","project_id":233834,"asset_id":324089,"created_at":"2021-03-11T15:55:56.589+08:00","updated_at":"2021-03-11T15:55:56.589+08:00"},{"id":4220491,"file_name":"frog_1.png","project_id":233834,"asset_id":324088,"created_at":"2021-03-11T15:55:56.590+08:00","updated_at":"2021-03-11T15:55:56.590+08:00"},{"id":4220492,"file_name":"frog_0.png","project_id":233834,"asset_id":324087,"created_at":"2021-03-11T15:55:56.591+08:00","updated_at":"2021-03-11T15:55:56.591+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦