{"id":165669,"student_id":3760,"content":"setBackdrop('bg.jpg');\nvar platform = createSprite(\"platform.png\");\nvar rocket = createSprite([\"rocket.png\",\"bomb.png\"]);\nvar fuel = 500;\nvar vx = 0;\nvar vy = 0;\n\nplatform.x = 500;\nplatform.y = 450;\n\nrocket.x = 50;\nrocket.y = 50;\nrocket.direction = 0;\n\nforever(function() {\n rocket.y += vy;\n rocket.x += vx;\n rocket.direction = vx*10;\n \n \n \n \n \n \n if (fuel \u003e 0) {\n if (key.up) {\n vy -= 0.1;\n fuel -= 1;\n }\n if (key.right) {\n vx += 0.1;\n fuel -= 1;\n }\n if (key.left) {\n vx -= 0.1;\n fuel -= 1;\n }\n }\n \n if (rocket.touched(platform)) {\n if (vy \u003e 1) {\n rocket.costumeId = 1; \n }\n if (rocket.direction\u003e10 || rocket.direction\u003c-10) {\n rocket.costumeId = 1; \n }\n stop();\n }\n \n if (rocket.x\u003c0 || rocket.x\u003e640 || rocket.y\u003c0 || rocket.y\u003e480) {\n rocket.costumeId = 1; \n stop();\n }\n \n vy += 0.05;\n print(\"fuel: \"+fuel, 10, 10, \"red\", 20);\n print(\"x: \"+Math.floor(rocket.x)+\" y: \"+Math.floor(rocket.y), 10, 50, \"white\", 20);\n});\n","created_at":"2020-07-17T15:30:06.663+08:00","updated_at":"2021-07-28T22:41:15.285+08:00","name":"火箭降落 副本","language":"javascript","screenshot":{"url":"https://cdn2.koding.school/uploads/project/screenshot/165669/4d1b678a6f851611372d76a8be777b39.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":41,"hashid":"yeys96dz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2879790,"file_name":"bg.jpg","project_id":165669,"asset_id":19411,"created_at":"2020-07-17T15:30:06.667+08:00","updated_at":"2020-07-17T15:30:06.667+08:00"},{"id":2879791,"file_name":"bomb.png","project_id":165669,"asset_id":19412,"created_at":"2020-07-17T15:30:06.668+08:00","updated_at":"2020-07-17T15:30:06.668+08:00"},{"id":2879792,"file_name":"rocket.png","project_id":165669,"asset_id":19413,"created_at":"2020-07-17T15:30:06.669+08:00","updated_at":"2020-07-17T15:30:06.669+08:00"},{"id":2879793,"file_name":"fire.png","project_id":165669,"asset_id":19414,"created_at":"2020-07-17T15:30:06.670+08:00","updated_at":"2020-07-17T15:30:06.670+08:00"},{"id":2879794,"file_name":"platform.png","project_id":165669,"asset_id":19415,"created_at":"2020-07-17T15:30:06.671+08:00","updated_at":"2020-07-17T15:30:06.671+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦