{"id":12412,"student_id":13,"content":"var score = 0;\nvar lives = 3;\nvar stageblocks = 0;\n\nvar player = createSprite(\"player.png\");\nplayer.y = 450 + player.height / 2;\n\nvar collider = [player];\n\nvar ball = createSprite(\"ball.png\");\nball.direction = 135;\n\nsetBackdrop(\"#333333\");\n\nfunction newBlocks() {\n for (var j = 0; j \u003c 6; j++) {\n for (var i = 0; i \u003c 10; i++) {\n var block = createSprite([\"block0.png\", \"block1.png\", \"block2.png\", \"block3.png\", \"block4.png\", \"block5.png\"]);\n block.costumeId = Math.floor(Math.random() * 6);\n block.x = i * 64 + 32;\n block.y = j * 32 + 16;\n block.forever(function () {\n if (this.touched(ball)) {\n score++;\n this.destroy();\n stageblocks--;\n }\n });\n collider.push(block);\n stageblocks++;\n }\n }\n}\n\nforever(function () {\n\n player.x = cursor.x;\n\n ball.stepForward(4);\n if (ball.touched(collider) \u0026\u0026 ball.y \u003c 424)\n // ball.direction -= (ball.direction-90)*2;\n ball.direction = 180 - ball.direction;\n if (ball.touched(player))\n // ball.y = (player.y - player.height / 2) - ball.height / 2\n if (lives \u003c= 0) {\n stop();\n }\n if (ball.y \u003e= 480) {\n lives--;\n ball.y = 300;\n } else {\n ball.bounceEdge();\n }\n if (stageblocks \u003c= 0) {\n newBlocks();\n }\n print(\"Score: \" + score, 20, 20, \"white\");\n print(\"Lives: \" + lives, 20, 40, \"white\");\n});","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-09T12:15:40.925+08:00","name":"breakout ","language":"javascript","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/12412/ab1dbb1ad0322ec58d91896ac0b14503.jpg"},"parent_id":9310,"plugin":"","description":"","note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":204,"hashid":"p93skmrk","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":264924,"file_name":"0.png","project_id":12412,"asset_id":6,"created_at":"2017-09-26T21:46:14.306+08:00","updated_at":"2017-09-26T21:46:14.306+08:00"},{"id":264925,"file_name":"1.svg","project_id":12412,"asset_id":7,"created_at":"2017-09-26T21:46:14.310+08:00","updated_at":"2017-09-26T21:46:14.310+08:00"},{"id":264926,"file_name":"2.png","project_id":12412,"asset_id":8,"created_at":"2017-09-26T21:46:14.314+08:00","updated_at":"2017-09-26T21:46:14.314+08:00"},{"id":264927,"file_name":"0.wav","project_id":12412,"asset_id":9,"created_at":"2017-09-26T21:46:14.318+08:00","updated_at":"2017-09-26T21:46:14.318+08:00"},{"id":264928,"file_name":"1.wav","project_id":12412,"asset_id":10,"created_at":"2017-09-26T21:46:14.321+08:00","updated_at":"2017-09-26T21:46:14.321+08:00"},{"id":264942,"file_name":"player.png","project_id":12412,"asset_id":32239,"created_at":"2017-09-26T21:49:13.789+08:00","updated_at":"2017-09-26T21:49:13.789+08:00"},{"id":264943,"file_name":"ball.png","project_id":12412,"asset_id":32240,"created_at":"2017-09-26T21:50:58.927+08:00","updated_at":"2017-09-26T21:50:58.927+08:00"},{"id":264944,"file_name":"block0.png","project_id":12412,"asset_id":32241,"created_at":"2017-09-26T21:56:44.301+08:00","updated_at":"2017-09-26T21:56:44.301+08:00"},{"id":264945,"file_name":"block1.png","project_id":12412,"asset_id":32242,"created_at":"2017-09-26T21:56:44.304+08:00","updated_at":"2017-09-26T21:56:44.304+08:00"},{"id":264946,"file_name":"block2.png","project_id":12412,"asset_id":32243,"created_at":"2017-09-26T21:56:44.923+08:00","updated_at":"2017-09-26T21:56:44.923+08:00"},{"id":264947,"file_name":"block3.png","project_id":12412,"asset_id":32244,"created_at":"2017-09-26T21:56:44.926+08:00","updated_at":"2017-09-26T21:56:44.926+08:00"},{"id":264948,"file_name":"block4.png","project_id":12412,"asset_id":32245,"created_at":"2017-09-26T21:56:45.552+08:00","updated_at":"2017-09-26T21:56:45.552+08:00"},{"id":264949,"file_name":"block5.png","project_id":12412,"asset_id":32246,"created_at":"2017-09-26T21:56:45.557+08:00","updated_at":"2017-09-26T21:56:45.557+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦