{"id":148144,"student_id":10,"content":"setBackdrop('bg.jpg');\nvar ball = createSprite( 'ball_1.png', 'ball_3.png');\nvar p1 = createSprite('p1.png');\nvar p2 = createSprite('p2.png');\nvar info = createSprite('info.png', 'bg_1.jpg', 'bg_2.jpg');\np1.x = 30;\np2.x = 1170;\nball.rotationStyle = 'fixed';\n// info.hidden = true;\n\nvar p1_score = 0;\nvar p2_score = 0;\nvar speed = 10;\n\ncreateSound('bgm.mp3', true);\nforever(loop);\n\nfunction loop () {\n if (key.o \u0026\u0026 p2.y \u003e 120) {\n p2.y -= 20;\n }\n if (key.l \u0026\u0026 p2.y \u003c 780) {\n p2.y += 20;\n }\n if (key.w \u0026\u0026 p1.y \u003e 120) {\n p1.y -= 20;\n }\n if (key.s \u0026\u0026 p1.y \u003c 780) {\n p1.y += 20;\n }\n\n if (info.hidden) {\n ball.stepForward(speed);\n }\n if (key.space) {\n info.hidden = true;\n }\n if (ball.y \u003c 0 || ball.y \u003e 900) {\n ball.direction = -ball.direction - 180;\n }\n if (ball.touched(p2) \u0026\u0026 ball.direction \u003c 180) {\n ball.direction = -ball.direction + Math.random()*15;\n speed = speed + 1;\n createSound('hit.mp3');\n }\n if (ball.touched(p1) \u0026\u0026 ball.direction \u003e 180) {\n ball.direction = -ball.direction + Math.random()*15;\n speed = speed + 1;\n createSound('hit.mp3');\n }\n if (ball.x \u003c 0) {\n ball.moveTo(600, 450);\n ball.direction = 270;\n speed = 10;\n p1_score = p1_score + 1;\n createSound('lose.ogg');\n }\n if (ball.x \u003e 1200) {\n ball.moveTo(600, 450);\n ball.direction = 90;\n speed = 10;\n p2_score = p2_score + 1;\n createSound('lose.ogg');\n }\n\n drawText(p1_score, 1140, 20, '#23B0DB', 80);\n drawText(p2_score, 30, 20, '#F46F25', 80);\n\n if (p1_score == 5) {\n info.costumeId = 1;\n info.hidden = false;\n stop();\n }\n if (p2_score == 5) {\n info.costumeId = 2;\n info.hidden = false;\n stop();\n }\n if (speed \u003c 15) {\n ball.costumeId = 0;\n } else {\n ball.costumeId = 1;\n }\n}","created_at":"2020-05-13T10:49:37.758+08:00","updated_at":"2020-05-13T10:50:24.296+08:00","name":"彈力球大賽","language":"javascript","screenshot":{"url":null},"parent_id":9289,"plugin":"Game.set({ width: 1200, height: 900 })\n","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":425,"hashid":"36ysp6v3","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2564841,"file_name":"ball_3.png","project_id":148144,"asset_id":198068,"created_at":"2020-05-13T10:49:37.764+08:00","updated_at":"2020-05-13T10:49:37.764+08:00"},{"id":2564842,"file_name":"ball_1.png","project_id":148144,"asset_id":198067,"created_at":"2020-05-13T10:49:37.766+08:00","updated_at":"2020-05-13T10:49:37.766+08:00"},{"id":2564843,"file_name":"info.png","project_id":148144,"asset_id":197997,"created_at":"2020-05-13T10:49:37.767+08:00","updated_at":"2020-05-13T10:49:37.767+08:00"},{"id":2564844,"file_name":"ball_0.png","project_id":148144,"asset_id":197998,"created_at":"2020-05-13T10:49:37.768+08:00","updated_at":"2020-05-13T10:49:37.768+08:00"},{"id":2564845,"file_name":"bg_2.jpg","project_id":148144,"asset_id":197996,"created_at":"2020-05-13T10:49:37.769+08:00","updated_at":"2020-05-13T10:49:37.769+08:00"},{"id":2564846,"file_name":"bg_1.jpg","project_id":148144,"asset_id":197995,"created_at":"2020-05-13T10:49:37.770+08:00","updated_at":"2020-05-13T10:49:37.770+08:00"},{"id":2564847,"file_name":"p2.png","project_id":148144,"asset_id":197971,"created_at":"2020-05-13T10:49:37.771+08:00","updated_at":"2020-05-13T10:49:37.771+08:00"},{"id":2564848,"file_name":"bg.jpg","project_id":148144,"asset_id":197970,"created_at":"2020-05-13T10:49:37.772+08:00","updated_at":"2020-05-13T10:49:37.772+08:00"},{"id":2564849,"file_name":"p1.png","project_id":148144,"asset_id":197969,"created_at":"2020-05-13T10:49:37.773+08:00","updated_at":"2020-05-13T10:49:37.773+08:00"},{"id":2564850,"file_name":"lose.ogg","project_id":148144,"asset_id":192734,"created_at":"2020-05-13T10:49:37.774+08:00","updated_at":"2020-05-13T10:49:37.774+08:00"},{"id":2564851,"file_name":"hit.mp3","project_id":148144,"asset_id":176486,"created_at":"2020-05-13T10:49:37.775+08:00","updated_at":"2020-05-13T10:49:37.775+08:00"},{"id":2564852,"file_name":"bgm.mp3","project_id":148144,"asset_id":176481,"created_at":"2020-05-13T10:49:37.776+08:00","updated_at":"2020-05-13T10:49:37.776+08:00"}]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer