{"id":7930,"student_id":10,"content":"","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-07T22:46:38.203+08:00","name":"彈力球大賽","language":"javascript","screenshot":{"url":"https://cdn1.koding.school/uploads/project/screenshot/7930/24fce2e6335945e478a4a4154415d89a.jpg"},"parent_id":2,"plugin":"setBackdrop('bg.jpg');\nvar ball = createSprite(\"ball.png\");\nvar player_left = createSprite({\n costumes: \"blue.jpg\",\n x: 10,\n y: 250\n});\nvar player_right = createSprite({\n costumes: \"orange.jpg\",\n x: 631,\n y: 250\n});\nvar score_left = 0;\nvar score_right = 0;\nvar speed = 5;\n// ====\nforever(function() {\n \tball.stepForward(speed);\n if(ball.y \u003c 0 || ball.y \u003e 480) {\n \tball.direction = -ball.direction - 180;\n } \n if(ball.touched(player_left) || ball.touched(player_right)) {\n \tball.direction = -ball.direction + Math.random()*15;\n speed = speed + 0.5;\n sound.play('BonusCube.mp3');\n }\n if(key.up) {\n player_right.y = player_right.y - 10;\n }\n if(key.down) {\n player_right.y = player_right.y + 10;\n }\n if(key.w) {\n player_left.y = player_left.y - 10;\n }\n if(key.s) {\n player_left.y = player_left.y + 10;\n }\n if(ball.x \u003c 0) {\n score_right = score_right + 1;\n ball.direction = 270;\n }\n if(ball.x \u003e 640) {\n score_left = score_left + 1;\n ball.direction = 90;\n }\n if(ball.x \u003c 0 || ball.x \u003e 640) {\n ball.moveTo(320, 240);\n speed = 5;\n }\n print(score_left, 30, 20, '#157df9', 40);\n print(score_right, 580, 20, '#fd7e24', 40);\n});","description":"右邊玩家:上、下\n左邊玩家:w、s","note":null,"status":"public","like_student_ids":[120,873,109,2349,300,10,4688,1921,2004],"is_featured":false,"views":1483,"hashid":"9ygsm42","is_content_changed":null,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":175144,"file_name":"blue.jpg","project_id":7930,"asset_id":21352,"created_at":"2017-07-18T12:14:38.630+08:00","updated_at":"2017-07-18T12:14:38.630+08:00"},{"id":175145,"file_name":"orange.jpg","project_id":7930,"asset_id":21353,"created_at":"2017-07-18T12:14:38.631+08:00","updated_at":"2017-07-18T12:14:38.631+08:00"},{"id":175146,"file_name":"ball.png","project_id":7930,"asset_id":21354,"created_at":"2017-07-18T12:14:38.632+08:00","updated_at":"2017-07-18T12:14:38.632+08:00"},{"id":175147,"file_name":"bg.jpg","project_id":7930,"asset_id":21355,"created_at":"2017-07-18T12:14:38.633+08:00","updated_at":"2017-07-18T12:14:38.633+08:00"},{"id":175148,"file_name":"BonusCube.mp3","project_id":7930,"asset_id":21356,"created_at":"2017-07-18T12:14:38.635+08:00","updated_at":"2017-07-18T12:14:38.635+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦