{"id":45452,"student_id":1661,"content":"setBackdrop('bg.jpg');\nvar target = createSprite('target.png');\ntarget.layer = 1;\n\nvar balloons = [];\nvar clock = 0;\nvar scores = 0;\nvar status = \"start\";\n\nforever(function() {\n target.x = cursor.x;\n target.y = cursor.y;\n if (clock%15 === 0 \u0026\u0026 status != 'stop') {\n var balloon = createSprite(['0.png', 'a_1.png', 'a_5.png', 'a_10.png', 'a_50.png', 'a_100.png', 'm_2.png', 'e_2.png']);\n var rand = Math.random();\n if (rand \u003c 0.1) {\n balloon.costumeId = 0;\n } else if (rand \u003c 0.3) {\n balloon.costumeId = 1;\n } else if (rand \u003c 0.5) {\n balloon.costumeId = 2;\n } else if (rand \u003c 0.7) {\n balloon.costumeId = 3;\n } else if (rand \u003c 0.8) {\n balloon.costumeId = 4;\n } else if (rand \u003c 0.85) {\n balloon.costumeId = 5;\n } else if (rand \u003c 0.9) {\n balloon.costumeId = 6;\n } else {\n balloon.costumeId = 7;\n }\n balloon.y = 500;\n balloon.x = Math.random()*640;\n balloons.push(balloon);\n }\n for (var i = 0; i \u003c balloons.length; i++) {\n balloons[i].y -= 3;\n if (cursor.isDown \u0026\u0026 balloons[i].touched(cursor)) {\n balloons[i].destroy();\n if (balloons[i].costumeId === 0) {\n scores = 0;\n }\n if (balloons[i].costumeId == 1) {\n scores += 1;\n }\n if (balloons[i].costumeId == 2) {\n scores += 5;\n }\n if (balloons[i].costumeId == 3) {\n scores += 10;\n }\n if (balloons[i].costumeId == 4) {\n scores += 50;\n }\n if (balloons[i].costumeId == 5) {\n scores += 100;\n }\n if (balloons[i].costumeId == 6) {\n scores *= 2;\n }\n if (balloons[i].costumeId == 7) {\n scores /= 2;\n }\n }\n if (balloons[i].costumeId === 0) {\n balloons[i].y -= 1;\n }\n if (balloons[i].costumeId == 1) {\n balloons[i].y -= 1;\n }\n if (balloons[i].costumeId == 2) {\n balloons[i].y -= 1;\n }\n if (balloons[i].costumeId == 3) {\n balloons[i].y -= 2;\n }\n if (balloons[i].costumeId == 4) {\n balloons[i].y -= 3;\n }\n if (balloons[i].costumeId == 5) {\n balloons[i].y -= 4;\n }\n if (balloons[i].costumeId == 6) {\n balloons[i].y -= 4;\n }\n if (balloons[i].costumeId == 7) {\n balloons[i].y -= 2;\n }\n }\n print(\"得分:\" + scores, 10, 10, 'red', 20);\n clock+=1;\n});\n\n\nsetTimeout(function() {\n status = 'stop';\n}, 30000);","created_at":"2018-10-14T09:52:02.914+08:00","updated_at":"2024-01-10T15:22:01.455+08:00","name":"射氣球 副本","language":"javascript","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/45452/4fd203348aaf607854920e9cf1387561.jpg"},"parent_id":11105,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":99,"hashid":"wdksmd4z","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":801752,"file_name":"bg.jpg","project_id":45452,"asset_id":29311,"created_at":"2018-10-14T09:52:02.923+08:00","updated_at":"2018-10-14T09:52:02.923+08:00"},{"id":801753,"file_name":"target.png","project_id":45452,"asset_id":29312,"created_at":"2018-10-14T09:52:02.924+08:00","updated_at":"2018-10-14T09:52:02.924+08:00"},{"id":801754,"file_name":"0.png","project_id":45452,"asset_id":29313,"created_at":"2018-10-14T09:52:02.926+08:00","updated_at":"2018-10-14T09:52:02.926+08:00"},{"id":801755,"file_name":"a_1.png","project_id":45452,"asset_id":29314,"created_at":"2018-10-14T09:52:02.928+08:00","updated_at":"2018-10-14T09:52:02.928+08:00"},{"id":801756,"file_name":"a_5.png","project_id":45452,"asset_id":29315,"created_at":"2018-10-14T09:52:02.930+08:00","updated_at":"2018-10-14T09:52:02.930+08:00"},{"id":801757,"file_name":"e_2.png","project_id":45452,"asset_id":29316,"created_at":"2018-10-14T09:52:02.932+08:00","updated_at":"2018-10-14T09:52:02.932+08:00"},{"id":801758,"file_name":"m_2.png","project_id":45452,"asset_id":29317,"created_at":"2018-10-14T09:52:02.933+08:00","updated_at":"2018-10-14T09:52:02.933+08:00"},{"id":801759,"file_name":"a_100.png","project_id":45452,"asset_id":29318,"created_at":"2018-10-14T09:52:02.935+08:00","updated_at":"2018-10-14T09:52:02.935+08:00"},{"id":801760,"file_name":"a_50.png","project_id":45452,"asset_id":29319,"created_at":"2018-10-14T09:52:02.937+08:00","updated_at":"2018-10-14T09:52:02.937+08:00"},{"id":801761,"file_name":"a_10.png","project_id":45452,"asset_id":29320,"created_at":"2018-10-14T09:52:02.939+08:00","updated_at":"2018-10-14T09:52:02.939+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦