{"id":17602,"student_id":1769,"content":"setBackdrop('#000000');\nvar ship = createSprite(\"ship.png\");\n\n ship.x = 320;\n ship.y = 240;\n\nvar food = createSprite(\"food.png\");\n food.x = 100 + Math.random() * 440;\n food.y = 100 + Math.random() * 280;\n\nvar bullets = [];\nvar score = 0;\nvar clock = 0;\n\nforever(function () {\n ship.toward(cursor);\n if(ship.distanceTo(cursor) \u003e 4) {\n ship.stepForward(3);\n }\n clock ++;\n if(clock%10 == 0) {\n var bullet = createSprite('bullet.png');\n bullet.direction = Math.random()*360;\n bullet.stepForward(500);\n bullet.direction = Math.random()*360;;\n bullets.push(bullet);\n }\n for(var i=0; i\u003cbullets.length; i++) {\n if(bullets[i].touched(ship)) {\n \t\tstop();\n \t}\n bullets[i].stepForward(2);\n }\n if(ship.touched(food)) {\n \tfood.x = Math.random()*640;\n food.y = Math.random()*480;\n score += 1;\n }\n print(score, 10, 10, '#21ffff', 20);\n});\n","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-10-29T07:24:44.247+08:00","name":"太空訓練","language":"javascript","screenshot":{"url":null},"parent_id":17346,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":273,"hashid":"4y3sgn43","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":359831,"file_name":"ship.png","project_id":17602,"asset_id":40602,"created_at":"2017-12-10T11:45:27.651+08:00","updated_at":"2017-12-10T11:45:27.651+08:00"},{"id":359832,"file_name":"food.png","project_id":17602,"asset_id":40601,"created_at":"2017-12-10T11:45:27.653+08:00","updated_at":"2017-12-10T11:45:27.653+08:00"},{"id":359833,"file_name":"bullet.png","project_id":17602,"asset_id":40600,"created_at":"2017-12-10T11:45:27.654+08:00","updated_at":"2017-12-10T11:45:27.654+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦