{"id":61166,"student_id":228,"content":"setBackdrop('bg.jpg');\nvar fuel = 5000;\nvar vx = 0;\nvar vy = 0;\nvar platform = createSprite(\"platform.png\");\nvar rocket = createSprite([\"rocket.png\",\"bomb.png\"]);\nrocket.direction = 0 ;\nrocket.x = 50;\nrocket.y = 50;\nplatform.x = 360;\nplatform.y = 240;\nforever(function() {\n rocket. direction = vx;\n print(fuel, 30 , 30 , 'red' , 30);\n vy = vy +0.06;\n rocket.x = rocket.x + vx;\n rocket.y = rocket.y + vy;\n \n if (fuel\u003e0) {\n if (key.up) {\n vy = vy - 0.1;\n fuel= fuel -1;\n }\n if (key.left) {\n vx = vx - 0.1;\n fuel= fuel -1;\n }\n if (key.right) {\n vx = vx + 0.1;\n fuel= fuel -1;\n } \n }\n if (rocket.x \u003c0 ||rocket.x \u003e640) {\n rocket.costumeId = 1;\n stop(); \n }\n if (rocket.y \u003c0 || rocket.y \u003e480) {\n rocket.costumeId = 1;\n stop(); \n }\n /*\n //var a = true\n //var b = true\n //if (a) {\n // if (b) {\n // print ('a和b 都是真的')\n // }\n \n //}*/\n if (rocket.touched(platform)) {\n if (rocket.y \u003e platform.y) {\n rocket.costumeId = 1;\n stop(); \n }\n if (rocket.x \u003c platform.x) {\n rocket.costumeId = 1;\n stop(); \n }\n if (vy\u003e1000 || vx\u003e1000 || vx\u003c1000) {\n rocket.costumeId = 1;\n stop(); \n }\n }\n });","created_at":"2019-03-30T13:32:41.322+08:00","updated_at":"2019-08-10T15:11:41.620+08:00","name":"火箭降落 副本","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/61166/dcf53b2fa092fb307916271820f0345d.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":114,"hashid":"meysqe88","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1075806,"file_name":"bg.jpg","project_id":61166,"asset_id":19411,"created_at":"2019-03-30T13:32:41.328+08:00","updated_at":"2019-03-30T13:32:41.328+08:00"},{"id":1075807,"file_name":"bomb.png","project_id":61166,"asset_id":19412,"created_at":"2019-03-30T13:32:41.329+08:00","updated_at":"2019-03-30T13:32:41.329+08:00"},{"id":1075808,"file_name":"rocket.png","project_id":61166,"asset_id":19413,"created_at":"2019-03-30T13:32:41.330+08:00","updated_at":"2019-03-30T13:32:41.330+08:00"},{"id":1075809,"file_name":"fire.png","project_id":61166,"asset_id":19414,"created_at":"2019-03-30T13:32:41.333+08:00","updated_at":"2019-03-30T13:32:41.333+08:00"},{"id":1075810,"file_name":"platform.png","project_id":61166,"asset_id":19415,"created_at":"2019-03-30T13:32:41.334+08:00","updated_at":"2019-03-30T13:32:41.334+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦