{"id":19863,"student_id":1587,"content":"setBackdrop('bg.jpg');\nvar platform = createSprite(\"platform.png\");\nvar rocket = createSprite([\"rocket.png\",\"bomb.png\"]);\nvar power = 300;\nvar vx = 0;\nvar vy = 0;\nvar f = (\"fire.png\");\nvar win = 0;\n//var gift = createSprite(\"gift3.png\");\n\nrocket.x = 50;\nrocket.y = 60;\nrocket.direction = 0;\nplatform.x = 530;\nplatform.y = 400;\n\nforever(function() {\n vy += 0.06;\n rocket.y += vy/3;\n rocket.x += vx/3;\n print(power,30,30,\"red\",30);\n if (power \u003e= 1) {\n if (key.up) {\n vy -= 0.1;\n power -= 1;\n }\n if (key.right) {\n vx += 0.1;\n rocket.direction = 0;\n rocket.direction += vx*5;\n }\n if (key.left) {\n vx -= 0.1;\n rocket.direction = 0;\n rocket.direction += vx*5;\n }\n\n if (rocket.x \u003e 630 || rocket.x \u003c10 || rocket.y \u003c 10 || rocket.y \u003e470) {\n rocket.costumeId = 1\n stop ();\n }\n\n if (rocket.touched(platform)) {\n if (vx\u003e0.6){\n rocket.costumeId = 1;\n } else {\n rocket.costumeId = 0;\n win += 1;\n }\n if (vy\u003e1.5){\n rocket.costumeId = 1;\n } else {\n rocket.costumeId = 0;\n win += 1; \n }\n if ( win==2 ) {\n print(\"goal\",100,200,\"white\",100);\n stop ();\n } else {\n rocket.costumeId = 1;\n stop();\n } \n }\n};\n});","created_at":"2018-01-12T19:22:48.498+08:00","updated_at":"2019-09-01T01:36:15.699+08:00","name":"火箭降落","language":"javascript","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/19863/2d04a1158d03ff284cdfcb5da44a9f16.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":148,"hashid":"gk4spnge","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":392351,"file_name":"bg.jpg","project_id":19863,"asset_id":19411,"created_at":"2018-01-12T19:22:48.514+08:00","updated_at":"2018-01-12T19:22:48.514+08:00"},{"id":392352,"file_name":"bomb.png","project_id":19863,"asset_id":19412,"created_at":"2018-01-12T19:22:48.523+08:00","updated_at":"2018-01-12T19:22:48.523+08:00"},{"id":392353,"file_name":"rocket.png","project_id":19863,"asset_id":19413,"created_at":"2018-01-12T19:22:48.527+08:00","updated_at":"2018-01-12T19:22:48.527+08:00"},{"id":392354,"file_name":"fire.png","project_id":19863,"asset_id":19414,"created_at":"2018-01-12T19:22:48.532+08:00","updated_at":"2018-01-12T19:22:48.532+08:00"},{"id":392355,"file_name":"platform.png","project_id":19863,"asset_id":19415,"created_at":"2018-01-12T19:22:48.536+08:00","updated_at":"2018-01-12T19:22:48.536+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦