{"id":119754,"student_id":10,"content":"setBackdrop(\"#222222\");\nvar player = createSprite(\"player.png\");\nvar ball = createSprite(\"ball.png\");\nvar score = 0;\nvar lives = 3;\nvar speed = 3;\n\nplayer.y = 450;\nball.direction = 180;\n\nvar blocks = [];\nfor (var j = 0; j \u003c 6; j++) {\n for (var i = 0; i \u003c 10; i++) {\n var block = createSprite([\"b0.png\", \"b1.png\", \"b2.png\", \"b3.png\", \"b4.png\", \"b5.png\"]);\n block.costumeId = Math.floor(Math.random()*6);\n block.x = i * 64 + 32;\n block.y = j * 32 + 16;\n blocks.push(block);\n }\n}\n\nforever(function () {\n print(\"Score: \" + score, 20, 20, \"white\");\n print(\"Lives: \" + lives, 20, 40, \"white\");\n\n player.x = cursor.x;\n ball.stepForward(speed);\n ball.bounceEdge();\n\n if (ball.y \u003e= 480) {\n ball.direction = 180;\n ball.x = 320;\n ball.y = 240;\n speed = 5;\n lives--;\n }\n if (lives \u003c= 0) {\n print('Game Over', 170, 200, 'white', 60);\n stop();\n }\n});\n\nball.on('touch', blocks, function (block) {\n ball.direction = -ball.direction + 180 + Math.random() * 20 - 10;\n block.destroy();\n score++;\n});\n\nball.on('touch', player, function () {\n ball.direction = -ball.direction + 180 + Math.random() * 20 - 10;\n ball.y = player.y - 27;\n if (speed \u003c 15) speed += 1;\n});","created_at":"2020-01-17T11:16:22.769+08:00","updated_at":"2020-01-17T11:16:40.956+08:00","name":"breakout","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/119754/8b1fce73d348edf4d8517f590b6f4dad.jpg"},"parent_id":2,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":249,"hashid":"p93sypvy","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2057920,"file_name":"player.png","project_id":119754,"asset_id":179814,"created_at":"2020-01-17T11:16:31.008+08:00","updated_at":"2020-01-17T11:16:31.008+08:00"},{"id":2057921,"file_name":"ball.png","project_id":119754,"asset_id":179815,"created_at":"2020-01-17T11:16:31.015+08:00","updated_at":"2020-01-17T11:16:31.015+08:00"},{"id":2057922,"file_name":"b0.png","project_id":119754,"asset_id":179816,"created_at":"2020-01-17T11:16:31.020+08:00","updated_at":"2020-01-17T11:16:31.020+08:00"},{"id":2057923,"file_name":"b1.png","project_id":119754,"asset_id":179817,"created_at":"2020-01-17T11:16:31.024+08:00","updated_at":"2020-01-17T11:16:31.024+08:00"},{"id":2057924,"file_name":"b2.png","project_id":119754,"asset_id":179818,"created_at":"2020-01-17T11:16:31.029+08:00","updated_at":"2020-01-17T11:16:31.029+08:00"},{"id":2057925,"file_name":"b3.png","project_id":119754,"asset_id":179819,"created_at":"2020-01-17T11:16:31.033+08:00","updated_at":"2020-01-17T11:16:31.033+08:00"},{"id":2057926,"file_name":"b4.png","project_id":119754,"asset_id":179820,"created_at":"2020-01-17T11:16:31.037+08:00","updated_at":"2020-01-17T11:16:31.037+08:00"},{"id":2057927,"file_name":"b5.png","project_id":119754,"asset_id":179821,"created_at":"2020-01-17T11:16:31.042+08:00","updated_at":"2020-01-17T11:16:31.042+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦