{"id":68541,"student_id":234,"content":"setBackdrop('bg.jpg');\nvar target = createSprite(\"target.png\");\nvar counter = 0;\nvar balloons = [];\nvar score = 0;\nvar speed = 0;\nvar p = 0;\nforever(function() {\n print(\"score = \" + score, 10, 10, \"red\", 40);\n target.layer = 1;\n target.moveTo(cursor.x, cursor.y);\n if (counter%30 === 0) {\n var balloon = createSprite([\"a_10.png\", \"a_50.png\", \"a_100.png\", \"m_2.png\", \"e_2.png\", \"a_5.png\", \"a_1.png\", \"0.png\"]);\n p = Math.floor(Math.random()*101);\n if (p \u003e 0 \u0026\u0026 p \u003c=15) {\n balloon.costumeId = 7;\n }\n if (p \u003e 15 \u0026\u0026 p \u003c=30) {\n balloon.costumeId = 4;\n }\n if (p \u003e 30 \u0026\u0026 p \u003c=45) {\n balloon.costumeId = 6;\n }\n if (p \u003e 45 \u0026\u0026 p \u003c=60) {\n balloon.costumeId = 5;\n }\n if (p \u003e 60 \u0026\u0026 p \u003c=72) {\n balloon.costumeId = 0;\n }\n if (p \u003e 72 \u0026\u0026 p \u003c=82) {\n balloon.costumeId = 1;\n }\n if (p \u003e 82 \u0026\u0026 p \u003c=92) {\n balloon.costumeId = 2;\n }\n if (p \u003e 92 \u0026\u0026 p \u003c=100) {\n balloon.costumeId = 3;\n }\n balloon.y = 500;\n balloon.x = Math.random()*600 +40;\n balloons.push(balloon);\n }\n for (var i = 0; i \u003c balloons.length; i++) {\n if (balloons[i].costumeId === 0) {\n balloons[i].y = balloons[i].y - 5;\n }\n if (balloons[i].costumeId === 1) {\n balloons[i].y = balloons[i].y - 10;\n }\n if (balloons[i].costumeId === 2) {\n balloons[i].y = balloons[i].y - 15;\n }\n if (balloons[i].costumeId === 3) {\n balloons[i].y = balloons[i].y - 20;\n }\n if (balloons[i].costumeId === 4) {\n balloons[i].layer = 2;\n balloons[i].y = balloons[i].y - 4+Math.floor(Math.random()*5);\n }\n if (balloons[i].costumeId === 5) {\n balloons[i].y = balloons[i].y - 5;\n }\n if (balloons[i].costumeId === 6) {\n balloons[i].y = balloons[i].y - 5;\n }\n if (balloons[i].costumeId === 7) {\n balloons[i].layer = 2;\n balloons[i].y = balloons[i].y - 4+Math.floor(Math.random()*5);\n }\n if (cursor.isDown \u0026\u0026 balloons[i].touched(cursor)) {\n if (balloons[i].costumeId === 0) {\n score += 10;\n }\n if (balloons[i].costumeId === 1) {\n score += 50;\n }\n if (balloons[i].costumeId === 2) {\n score += 100;\n }\n if (balloons[i].costumeId === 3) {\n score *= 2;\n }\n if (balloons[i].costumeId === 4) {\n score /= 2;\n }\n if (balloons[i].costumeId === 5) {\n score += 5;\n }\n if (balloons[i].costumeId === 6) {\n score += 1;\n }\n if (balloons[i].costumeId === 7) {\n score = 0;\n }\n balloons[i].destroy();\n }\n }\n setTimeout(function() {\n stop();\n print(\"score = \" + score, 10, 10, \"red\", 40);\n }, 30000);\n counter++;\n});","created_at":"2019-05-18T15:20:29.945+08:00","updated_at":"2019-11-09T12:50:06.131+08:00","name":"射氣球 副本","language":"javascript","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/68541/c00b60e6a8cf4634de02fde6d495039f.jpg"},"parent_id":11105,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":104,"hashid":"jzmsnww2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1200805,"file_name":"bg.jpg","project_id":68541,"asset_id":29311,"created_at":"2019-05-18T15:20:29.950+08:00","updated_at":"2019-05-18T15:20:29.950+08:00"},{"id":1200806,"file_name":"target.png","project_id":68541,"asset_id":29312,"created_at":"2019-05-18T15:20:29.951+08:00","updated_at":"2019-05-18T15:20:29.951+08:00"},{"id":1200807,"file_name":"0.png","project_id":68541,"asset_id":29313,"created_at":"2019-05-18T15:20:29.952+08:00","updated_at":"2019-05-18T15:20:29.952+08:00"},{"id":1200808,"file_name":"a_1.png","project_id":68541,"asset_id":29314,"created_at":"2019-05-18T15:20:29.953+08:00","updated_at":"2019-05-18T15:20:29.953+08:00"},{"id":1200809,"file_name":"a_5.png","project_id":68541,"asset_id":29315,"created_at":"2019-05-18T15:20:29.954+08:00","updated_at":"2019-05-18T15:20:29.954+08:00"},{"id":1200810,"file_name":"e_2.png","project_id":68541,"asset_id":29316,"created_at":"2019-05-18T15:20:29.955+08:00","updated_at":"2019-05-18T15:20:29.955+08:00"},{"id":1200811,"file_name":"m_2.png","project_id":68541,"asset_id":29317,"created_at":"2019-05-18T15:20:29.955+08:00","updated_at":"2019-05-18T15:20:29.955+08:00"},{"id":1200812,"file_name":"a_100.png","project_id":68541,"asset_id":29318,"created_at":"2019-05-18T15:20:29.956+08:00","updated_at":"2019-05-18T15:20:29.956+08:00"},{"id":1200813,"file_name":"a_50.png","project_id":68541,"asset_id":29319,"created_at":"2019-05-18T15:20:29.957+08:00","updated_at":"2019-05-18T15:20:29.957+08:00"},{"id":1200814,"file_name":"a_10.png","project_id":68541,"asset_id":29320,"created_at":"2019-05-18T15:20:29.958+08:00","updated_at":"2019-05-18T15:20:29.958+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦