{"id":41885,"student_id":37,"content":"// 設定背景圖\nsetBackdrop('bg.jpg');\n\n// 創造角色\nvar ball = createSprite(\"ball.png\");\nvar p1 = createSprite(\"orange.jpg\");\nvar p2 = createSprite(\"blue.jpg\");\n\n// 初始化位置\np1.x = 631;\np2.x = 10;\nball.direction = 60;\n\nvar score1 = 0;\nvar score2 = 0;\nvar speed = 5;\n\nforever(function() {\n\n ball.stepForward(speed);\n p2.y = ball.y;\n //ball.direction = 60;\n\n if (ball.x \u003c 0 || ball.x \u003e 640) {\n ball.direction = ball.direction * -1;\n sound.play(\"BonusCube.mp3\");\n\n }\n if (ball.y \u003c 0 || ball.y \u003e 480) {\n ball.direction = ball.direction * -1 + 180;\n sound.play(\"BonusCube.mp3\");\n }\n if (ball.touched(p1) || ball.touched(p2)) {\n ball.direction = ball.direction * -1;\n }\n if (ball.x \u003e 640) {\n score2 = score2 + 1;\n ball.x = 320;\n ball.y = 240;\n ball.direction = ball.direction * -1;\n }\n\n if (ball.x \u003c 0) {\n score1 = score1 + 1;\n ball.x = 320;\n ball.y = 240;\n ball.direction = ball.direction * -1;\n }\n\n\n\n\n\n\n if (key.down) {\n p1.y = p1.y + 10;\n }\n\n if (key.up) {\n p1.y = p1.y - 10;\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n //分數\n print(score2, 30, 20, '#157df9', 40);\n print(score1, 580, 20, '#fd7e24', 40);\n});\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","created_at":"2018-09-09T10:02:54.836+08:00","updated_at":"2019-10-27T04:12:05.879+08:00","name":"彈力球大賽 副本","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/41885/3c4782bf0a7395c5c01836d38d976f70.jpg"},"parent_id":8219,"plugin":"\n","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":60,"hashid":"yeys4pe3","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":736374,"file_name":"blue.jpg","project_id":41885,"asset_id":22110,"created_at":"2018-09-09T10:02:54.853+08:00","updated_at":"2018-09-09T10:02:54.853+08:00"},{"id":736375,"file_name":"orange.jpg","project_id":41885,"asset_id":22111,"created_at":"2018-09-09T10:02:54.861+08:00","updated_at":"2018-09-09T10:02:54.861+08:00"},{"id":736376,"file_name":"ball.png","project_id":41885,"asset_id":22112,"created_at":"2018-09-09T10:02:54.863+08:00","updated_at":"2018-09-09T10:02:54.863+08:00"},{"id":736377,"file_name":"bg.jpg","project_id":41885,"asset_id":22113,"created_at":"2018-09-09T10:02:54.865+08:00","updated_at":"2018-09-09T10:02:54.865+08:00"},{"id":736378,"file_name":"BonusCube.mp3","project_id":41885,"asset_id":22114,"created_at":"2018-09-09T10:02:54.868+08:00","updated_at":"2018-09-09T10:02:54.868+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦