{"id":7884,"student_id":10,"content":"setBackdrop('bg.jpg');\n\nvar speed = 0;\nvar score_left = 0;\nvar score_right = 0;\n\nvar ball = createSprite(\"ball.png\");\n\nrestart();\n\nvar player_left = createSprite({\n costumes: \"blue.jpg\",\n x: 10,\n y: 250\n});\n\nvar player_right = createSprite({\n costumes: \"orange.jpg\",\n x: 631,\n y: 250\n});\n\n\nwhen('holding','up', function() {\n\tplayer_right.y -= 10;\n});\nwhen('holding','down', function() {\n\tplayer_right.y += 10;\n});\nwhen('holding','w', function() {\n\tplayer_left.y -= 10;\n});\nwhen('holding','s', function() {\n\tplayer_left.y += 10;\n});\n\nforever(function() {\n\n ball.stepForward(speed);\n \n if(ball.y \u003c 10 || ball.y \u003e 470) {\n \tball.direction = 180 - ball.direction;\n }\n \n if(ball.touched(player_left) || ball.touched(player_right)) {\n ball.direction = - ball.direction + Math.random()*15;\n ball.stepForward(1);\n if(speed \u003c 15) {\n \tspeed += 2;\n }\n }\n \n if(ball.x \u003c 0) {\n \tscore_right += 1;\n \trestart();\n }\n \n if(ball.x \u003e 640) {\n \tscore_left += 1;\n \trestart();\n }\n \n print(score_left, 30, 20, '#157df9', 40);\n print(score_right, 580, 20, '#fd7e24', 40);\n\n});\n\nfunction restart () {\n\tball.x = 320;\n ball.y = 240;\n speed = 2;\n ball.direction = Math.random() \u003e 0.5 ? 90 : 270;\n}","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-08T07:58:28.388+08:00","name":"空氣球","language":"javascript","screenshot":{"url":null},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":529,"hashid":"p93s9gq","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":174582,"file_name":"blue.jpg","project_id":7884,"asset_id":21213,"created_at":"2017-07-11T11:07:12.892+08:00","updated_at":"2017-07-11T11:07:12.892+08:00"},{"id":174583,"file_name":"orange.jpg","project_id":7884,"asset_id":21214,"created_at":"2017-07-11T11:07:12.894+08:00","updated_at":"2017-07-11T11:07:12.894+08:00"},{"id":174584,"file_name":"ball.png","project_id":7884,"asset_id":21215,"created_at":"2017-07-11T11:07:12.895+08:00","updated_at":"2017-07-11T11:07:12.895+08:00"},{"id":174585,"file_name":"bg.jpg","project_id":7884,"asset_id":21216,"created_at":"2017-07-11T11:07:12.896+08:00","updated_at":"2017-07-11T11:07:12.896+08:00"},{"id":174586,"file_name":"BonusCube.mp3","project_id":7884,"asset_id":21217,"created_at":"2017-07-11T11:07:12.898+08:00","updated_at":"2017-07-11T11:07:12.898+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