{"id":111626,"student_id":3302,"content":"setBackdrop('bg.jpg');\nvar platform = createSprite(\"platform.png\");\nvar platform2 = createSprite(\"platform.png\");\nvar platform3 = createSprite(\"platform.png\");\nvar rocket = createSprite([\"rocket.png\", \"bomb.png\"]);\nvar x = createSprite(\"00854c71fce04a7f0bf482f20ac81dc33e09f2b514367-XNuFko_fw658.png\");\nvar x2 = createSprite(\"00854c71fce04a7f0bf482f20ac81dc33e09f2b514367-XNuFko_fw658.png\");\nvar x3 = createSprite(\"00854c71fce04a7f0bf482f20ac81dc33e09f2b514367-XNuFko_fw658.png\");\nvar x4 = createSprite(\"00854c71fce04a7f0bf482f20ac81dc33e09f2b514367-XNuFko_fw658.png\");\nvar x5 = createSprite(\"00854c71fce04a7f0bf482f20ac81dc33e09f2b514367-XNuFko_fw658.png\");\nvar fuel = 1000;\nvar vy = 0;\nvar vx = 0;\nvar y = 0;\nvar direction = 90;\nvar speed = 5;\nvar speed2 = 6;\nvar speed3 = 7;\nvar speed4 = 3;\nvar speed5 = 4;\nvar score = 0;\nvar time = 0;\nvar clock = 0;\nx.x = Math.random()*640;\nx2.x = Math.random()*640;\nx3.x = Math.random()*640;\nx4.x = Math.random()*640;\nx5.x = Math.random()*640;\nx.y = y;\nx2.y = y;\nx3.y = y;\nx4.y = y;\nx5.y = y;\nx.y -= 320;\nx2.y -= 320;\nx3.y -= 320;\nx4.y -= 320;\nx5.y -= 320;\nx2.scale = 0.05;\nx3.scale = 0.07;\nx5.scale = 0.02;\nx4.scale = 0.06;\nx.scale = 0.03;\n\nplatform.x = 500;\nplatform.y = 450;\nplatform2.x = 300;\nplatform2.y = 450;\nplatform3.x = 100;\nplatform3.y = 450;\nrocket.x = Math.random()*640;\nrocket.y = Math.random()*200+200;\nrocket.direction = 0;\n\nforever(function() {\n a();\n bob();\n rocket.y += vy;\n rocket.x += vx;\n if (clock%1 === 0) {\n time += 1;\n }\n \n if (rocket.touched(platform)) {\n score += 5;\n rocket.x = Math.random()*640;\n rocket.y = Math.random()*200+200;\n x.y -= 640;\n x2.y -= 640;\n x3.y -= 640;\n x4.y -= 640;\n x5.y -= 640;\n speed = 5;\n speed2 = 6;\n speed3 = 7;\n speed4 = 3;\n speed5 = 4;\n vy = 0;\n time -= 50;\n }\n\n if (rocket.touched(platform2)) {\n\n score += 5;\n rocket.x = Math.random()*640;\n rocket.y = Math.random()*200+200;\n x.y -= 640;\n x2.y -= 640;\n x3.y -= 640;\n x4.y -= 640;\n x5.y -= 640;\n speed = 5;\n speed2 = 6;\n speed3 = 7;\n speed4 = 3;\n speed5 = 4;\n vy = 0;\n time -= 50;\n }\n\n if (rocket.touched(platform3)) {\n score += 5;\n rocket.x = Math.random()*640;\n rocket.y = Math.random()*200+200;\n x.y -= 640;\n x2.y -= 640;\n x3.y -= 640;\n x4.y -= 640;\n x5.y -= 640;\n speed = 5;\n speed2 = 6;\n speed3 = 7;\n speed4 = 3;\n speed5 = 4;\n vy = 0;\n time -= 50;\n }\n if (fuel \u003e 0) {\n if (key.up) {\n vy -= 0.1;\n fuel -= 0;\n }\n if (key.right) {\n vx += 0.1;\n fuel -= 0;\n }\n\n if (key.left) {\n vx -= 0.1;\n fuel -= 0;\n }\n }\n vy += 0.06;\n print(\"score:\"+ score, 10, 100, \"red\", 20);\n print(\"time:\"+ time, 10, 130, \"red\", 20);\n print(\"fuel:\"+ fuel, 10, 10, \"red\", 20);\n print(\"vy:\"+ vy, 10, 40, \"red\", 20);\n});\nfunction bob() {\n y -= 500;\n x.direction = direction;\n x2.direction = direction;\n x3.direction = direction;\n x4.direction = direction;\n x5.direction = direction;\n x.y += speed;\n x2.y += speed2;\n x3.y += speed3;\n x4.y += speed4;\n x5.y += speed5;\n if (x.y \u003e 360 || x.y \u003c 0) {\n x.y = 0;\n speed += Math.random()*3+1;\n speed -= Math.random()*4;\n x.x = Math.random()*640;\n x.y -= 320;\n }\n if (x2.y \u003e 360 || x2.y \u003c 0) {\n x2.y = 0;\n x2.y -= 320;\n speed2 += Math.random()*1+2;\n speed2 -= Math.random()*5;\n x2.x = Math.random()*640;\n }\n if (x3.y \u003e 360 || x3.y \u003c 0) {\n x3.y = 0;\n x.y -= 320;\n speed3 += Math.random()*3+1;\n speed3 -= Math.random()*6;\n x3.x = Math.random()*640;\n }\n if (x4.y \u003e 360 || x4.y \u003c 0) {\n x4.y = 0;\n x.y -= 100;\n speed4 += Math.random()*3+2;\n speed4 -= Math.random()*4;\n x4.x = Math.random()*640;\n }\n if (x5.y \u003e 360 || x5.y \u003c 0) {\n x5.y = 0;\n x.y -= 100;\n speed5 += Math.random()*2+2;\n speed5 -= Math.random()*5;\n x5.x = Math.random()*640;\n }\n}\nfunction a() {\n if (rocket.touched(x) || rocket.touched(x2) || rocket.touched(x3) || rocket.touched(x4) || rocket.touched(x5) || rocket.y \u003e 440) {\n rocket.costumeId = 1;\n stop();\n }\n\n\n\n}","created_at":"2019-12-04T20:06:33.552+08:00","updated_at":"2020-02-09T06:43:14.044+08:00","name":"火箭降落 副本","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/111626/8d7168102d17242f3da6b856b6f27f8c.jpg"},"parent_id":10697,"plugin":"var fire = createSprite(\"fire.png\");\nfire.scale = 0.7;\nforever(function() {\n if(window.rocket \u0026\u0026 window.platform) {\n fire.x = rocket.x;\n fire.y = rocket.y;\n fire.direction = rocket.direction - 180;\n fire.stepForward(65);\n fire.direction = rocket.direction;\n if(window.rocket \u0026\u0026 (key.up || key.left || key.right) \u0026\u0026 window.fuel\u003e0) {\n fire.hidden = false;\n } else {\n fire.hidden = true;\n }\n if(rocket.touched(platform)) {\n // fire.hidden = true;\n }\n }\n});","description":"上、左、右推進火箭\n在料用盡前成功火箭降落在平台上。","note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":177,"hashid":"jzms3ekp","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1903639,"file_name":"bg.jpg","project_id":111626,"asset_id":19411,"created_at":"2019-12-04T20:06:33.559+08:00","updated_at":"2019-12-04T20:06:33.559+08:00"},{"id":1903640,"file_name":"bomb.png","project_id":111626,"asset_id":19412,"created_at":"2019-12-04T20:06:33.561+08:00","updated_at":"2019-12-04T20:06:33.561+08:00"},{"id":1903641,"file_name":"rocket.png","project_id":111626,"asset_id":19413,"created_at":"2019-12-04T20:06:33.562+08:00","updated_at":"2019-12-04T20:06:33.562+08:00"},{"id":1903642,"file_name":"fire.png","project_id":111626,"asset_id":19414,"created_at":"2019-12-04T20:06:33.564+08:00","updated_at":"2019-12-04T20:06:33.564+08:00"},{"id":1903643,"file_name":"platform.png","project_id":111626,"asset_id":19415,"created_at":"2019-12-04T20:06:33.566+08:00","updated_at":"2019-12-04T20:06:33.566+08:00"},{"id":2093403,"file_name":"00854c71fce04a7f0bf482f20ac81dc33e09f2b514367-XNuFko_fw658.png","project_id":111626,"asset_id":182480,"created_at":"2020-01-25T03:30:28.188+08:00","updated_at":"2020-01-25T03:30:28.188+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦