{"id":24927,"student_id":3206,"content":"setBackdrop('bg.jpg');\nvar target = createSprite(['target.png']);\nvar n = 0;\nvar ball = [];\nvar score = 0;\nvar g = 0\nvar nowtime = Date.now();\nsetTimeout(function() {\n stop();\n\n}, 100000);\n\nforever(function() {\n if (key.z) {\n g = 1;\n }\n if (key.c) {\n g = 0;\n }\n if (g == 0) {\n target.layer = 1;\n if (target.touched(cursor)) {\n target.stepForward(0);\n } else {\n target.stepForward(10);\n }\n target.toward(cursor)\n print(score, 20, 20, '#157df9', 40);\n print(\"now\"+(Date.now()-nowtime)/1000+\"s\", 20, 60, '#157df9', 40);\n n++;\n if (n%30 === 0) {\n var o = 0;\n o = Math.random()*640;\n var bull = createSprite(['1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png'])\n bull.y = 480;\n bull.x = o;\n bull.costumeId = Math.floor(Math.random()*8);\n ball.push(bull);\n }\n for (var b = 0; b \u003c ball.length; b++) {\n ball[b].y -= 3;\n if (ball[b] === 0) {\n ball[b].y -= 3;\n } else if (ball[b] == 1) {\n ball[b].y -= 4;\n } else if (ball[b] == 2) {\n ball[b].y -= 5;\n } else if (ball[b] == 3) {\n ball[b].y -= 6;\n } else if (ball[b] == 4) {\n ball[b].y -= 6;\n } else if (ball[b] == 5) {\n ball[b].y -= 2.5;\n } else if (ball[b] == 6) {\n ball[b].y -= 2;\n } else if (ball[b] == 7) {\n ball[b].y -= 1.3;\n }if (cursor.isDown \u0026\u0026 ball[b].touched(cursor)) {\n ball[b].destroy();\n\n if (ball[b].costumeId === 0) {\n score += 1;\n } else if (ball[b].costumeId == 1) {\n score += 50;\n } else if (ball[b].costumeId == 2) {\n score += 100;\n } else if (ball[b].costumeId == 3) {\n score *= 2;\n } else if (ball[b].costumeId == 4) {\n score /= 2;\n } else if (ball[b].costumeId == 5) {\n score += 5;\n } else if (ball[b].costumeId == 6) {\n score += 1;\n } else if (ball[b].costumeId == 7) {\n score = 0;\n }\n\n }\n }\n }\n //------------------------------------------------------------\n if (g == 1) {\n target.layer = 1;\n if (target.touched(cursor)) {\n target.stepForward(0);\n } else {\n target.stepForward(10);\n }\n target.toward(cursor)\n print(score, 20, 20, '#157df9', 40);\n print(\"now\"+(Date.now()-nowtime)/1000+\"s\", 20, 60, '#157df9', 40);\n n++;\n if (n%30 === 0) {\n var o = 0;\n o = Math.random()*640;\n var bull = createSprite(['1.png', '2.png', '3.png', '4.png', '5.png', '6.png', '7.png', '8.png'])\n bull.y = 480;\n bull.x = o;\n bull.costumeId = Math.floor(Math.random()*8);\n ball.push(bull);\n }\n for (var b = 0; b \u003c ball.length; b++) {\n ball[b].y -= 3;\n if (ball[b] === 0) {\n ball[b].y -= 3;\n } else if (ball[b] == 1) {\n ball[b].y -= 4;\n } else if (ball[b] == 2) {\n ball[b].y -= 5;\n } else if (ball[b] == 3) {\n ball[b].y -= 6;\n } else if (ball[b] == 4) {\n ball[b].y -= 6;\n } else if (ball[b] == 5) {\n ball[b].y -= 2.5;\n } else if (ball[b] == 6) {\n ball[b].y -= 2;\n } else if (ball[b] == 7) {\n ball[b].y -= 1.3;\n }\n\n if (cursor.isDown) {\n ball[b].destroy();\n\n if (ball[b].costumeId === 0) {\n score += 1;\n } else if (ball[b].costumeId == 1) {\n score += 50;\n } else if (ball[b].costumeId == 2) {\n score += 100;\n } else if (ball[b].costumeId == 3) {\n score *= 2;\n } else if (ball[b].costumeId == 4) {\n score *= 2;\n } else if (ball[b].costumeId == 5) {\n score += 5;\n } else if (ball[b].costumeId == 6) {\n score += 1;\n } else if (ball[b].costumeId == 7) {\n score += 100;\n }\n\n }\n }\n }\n\n\n})","created_at":"2018-03-17T18:48:23.928+08:00","updated_at":"2019-10-16T21:18:54.205+08:00","name":"射氣球","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/24927/8b35aee63442374386f2f3cdb990e6ee.jpg"},"parent_id":11105,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":70,"hashid":"vngs5q8w","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":469822,"file_name":"bg.jpg","project_id":24927,"asset_id":29311,"created_at":"2018-03-17T18:48:23.935+08:00","updated_at":"2018-03-17T18:48:23.935+08:00"},{"id":469823,"file_name":"target.png","project_id":24927,"asset_id":29312,"created_at":"2018-03-17T18:48:23.938+08:00","updated_at":"2018-03-17T18:48:23.938+08:00"},{"id":469831,"file_name":"1.png","project_id":24927,"asset_id":29320,"created_at":"2018-03-17T18:48:23.951+08:00","updated_at":"2018-05-05T19:06:07.949+08:00"},{"id":469830,"file_name":"2.png","project_id":24927,"asset_id":29319,"created_at":"2018-03-17T18:48:23.949+08:00","updated_at":"2018-05-05T19:06:12.401+08:00"},{"id":469829,"file_name":"3.png","project_id":24927,"asset_id":29318,"created_at":"2018-03-17T18:48:23.948+08:00","updated_at":"2018-05-05T19:06:16.294+08:00"},{"id":469828,"file_name":"4.png","project_id":24927,"asset_id":29317,"created_at":"2018-03-17T18:48:23.946+08:00","updated_at":"2018-05-05T19:06:21.464+08:00"},{"id":469827,"file_name":"5.png","project_id":24927,"asset_id":29316,"created_at":"2018-03-17T18:48:23.945+08:00","updated_at":"2018-05-05T19:06:25.222+08:00"},{"id":469826,"file_name":"6.png","project_id":24927,"asset_id":29315,"created_at":"2018-03-17T18:48:23.943+08:00","updated_at":"2018-05-05T19:06:29.608+08:00"},{"id":469825,"file_name":"7.png","project_id":24927,"asset_id":29314,"created_at":"2018-03-17T18:48:23.941+08:00","updated_at":"2018-05-05T19:06:35.225+08:00"},{"id":469824,"file_name":"8.png","project_id":24927,"asset_id":29313,"created_at":"2018-03-17T18:48:23.939+08:00","updated_at":"2018-05-05T19:06:39.574+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦