{"id":184836,"student_id":3760,"content":"setBackdrop('black');\nsound.play('bgm.mp3', true);\nvar ship = createSprite(\"ship.png\");\nvar food = createSprite(\"food.png\");\nfood.x = 50 + Math.random() * 540;\nfood.y = 50 + Math.random() * 380;\nship.layer = 1;\n\nvar shadows = [];\nvar bullets = [];\nvar score = 0;\nvar clock = 0;\n\nforever(function () {\n var speed = ship.distanceTo(cursor)/20;\n ship.toward(cursor);\n ship.stepForward(speed);\n\n clock ++;\n if (clock%5 === 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 if (clock%5 === 0) {\n var shadow = createSprite('flame.png');\n shadow.direction = ship.direction;\n shadow.moveTo(ship);\n shadows.push(shadow);\n }\n for (let i = 0; i \u003c bullets.length; i++) {\n if (bullets[i].distanceTo(320, 240) \u003e 500) {\n bullets[i].destroy();\n }\n bullets[i].stepForward(2);\n }\n for (let i = 0; i \u003c shadows.length; i++) {\n shadows[i].opacity -= 0.01;\n shadows[i].scale -= 0.01;\n shadows[i].direction += 2;\n if (shadows[i].opacity \u003c 0) shadows[i].destroy();\n }\n if (ship.touched(bullets)) stop();\n if (ship.touched(food)) {\n food.x = 50 + Math.random() * 540;\n food.y = 50 + Math.random() * 380;\n food.direction = Math.random() * 360;\n score += 1;\n sound.play('effect.wav');\n }\n print(score, 10, 10, '#21ffff', 20);\n});","created_at":"2020-08-22T23:12:17.007+08:00","updated_at":"2020-08-22T23:12:17.007+08:00","name":"太空訓練_臺南版 副本","language":"javascript","screenshot":{"url":null},"parent_id":129702,"plugin":"","description":"上、左、右推進火箭\n在料用盡前成功火箭降落在平台上。","note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":70,"hashid":"p93spj48","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3146112,"file_name":"ship.png","project_id":184836,"asset_id":172332,"created_at":"2020-08-22T23:12:17.015+08:00","updated_at":"2020-08-22T23:12:17.015+08:00"},{"id":3146113,"file_name":"food.png","project_id":184836,"asset_id":172333,"created_at":"2020-08-22T23:12:17.022+08:00","updated_at":"2020-08-22T23:12:17.022+08:00"},{"id":3146114,"file_name":"bullet.png","project_id":184836,"asset_id":172334,"created_at":"2020-08-22T23:12:17.023+08:00","updated_at":"2020-08-22T23:12:17.023+08:00"},{"id":3146115,"file_name":"bgm.mp3","project_id":184836,"asset_id":172346,"created_at":"2020-08-22T23:12:17.024+08:00","updated_at":"2020-08-22T23:12:17.024+08:00"},{"id":3146116,"file_name":"flame.png","project_id":184836,"asset_id":170594,"created_at":"2020-08-22T23:12:17.025+08:00","updated_at":"2020-08-22T23:12:17.025+08:00"},{"id":3146117,"file_name":"effect.wav","project_id":184836,"asset_id":172347,"created_at":"2020-08-22T23:12:17.032+08:00","updated_at":"2020-08-22T23:12:17.032+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦