{"id":94076,"student_id":3439,"content":"setBackdrop('bg.png', 0, 0, 640, 480);\n\nvar p1 = createSprite([\"right_0.png\", \"right_1.png\", \"right_2.png\", \"right_3.png\"]);\np1.x = 340;\np1.y = 400;\nvar score1 = 0;\nvar score2 = 0;\nvar p2 = createSprite([\"left_0.png\", \"left_1.png\", \"left_2.png\", \"left_3.png\"]);\np2.x = 300;\np2.y = 400;\n\nvar step = Math.random()*200 + 50;\nstep = Math.round(step);\n\nforever(function() {\n print('p1:' + score1, 20, 50, \"red\", 30);\n print('p2:' + score2, 20, 80, \"red\", 30);\n\n move();\n fire();\n if (p1.costumeId == 3 || p2.costumeId == 3) {\n if (key.q) {\n init()\n\n }\n }\n});\nfunction move() {\nif (step \u003e 0) {\np1.x += 1\np2.x -= 1\nstep -= 1\n}\nif (step == 0 \u0026\u0026 p1.costumeId == 0) {\np1.costumeId = 1\np2.costumeId = 1\n}\n};\nfunction fire() {\nif (key.enter \u0026\u0026 p1.costumeId == 1) {\np1.costumeId = 2\np2.costumeId = 3\nsound.play('shot.wav')\nscore1 += 1\n}\nif (key.space \u0026\u0026 p1.costumeId == 1) {\np1.costumeId = 3\np2.costumeId = 2\nsound.play('shot.wav')\nscore2 += 1;\n}\n\n};\nfunction init() {\np1.x = 340;\np1.y = 400;\np2.x = 300;\np2.y = 400;\np1.costumeId = 0\np2.costumeId = 0\nstep = Math.round(Math.random()*200 + 50);\n}","created_at":"2019-09-07T10:22:19.064+08:00","updated_at":"2019-11-09T01:11:48.952+08:00","name":"牛仔大對決 副本","language":"javascript","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/94076/88be87b8eb0334166c5c2f6afd480268.jpg"},"parent_id":10701,"plugin":"","description":"","note":"","status":"public","like_student_ids":[],"is_featured":false,"views":46,"hashid":"2pdsqy3n","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":1590400,"file_name":"bg.png","project_id":94076,"asset_id":28736,"created_at":"2019-09-07T10:22:19.071+08:00","updated_at":"2019-09-07T10:22:19.071+08:00"},{"id":1590401,"file_name":"shot.wav","project_id":94076,"asset_id":28737,"created_at":"2019-09-07T10:22:19.072+08:00","updated_at":"2019-09-07T10:22:19.072+08:00"},{"id":1590402,"file_name":"left_1.png","project_id":94076,"asset_id":28738,"created_at":"2019-09-07T10:22:19.074+08:00","updated_at":"2019-09-07T10:22:19.074+08:00"},{"id":1590403,"file_name":"left_0.png","project_id":94076,"asset_id":28739,"created_at":"2019-09-07T10:22:19.075+08:00","updated_at":"2019-09-07T10:22:19.075+08:00"},{"id":1590404,"file_name":"left_2.png","project_id":94076,"asset_id":28740,"created_at":"2019-09-07T10:22:19.076+08:00","updated_at":"2019-09-07T10:22:19.076+08:00"},{"id":1590405,"file_name":"left_3.png","project_id":94076,"asset_id":28741,"created_at":"2019-09-07T10:22:19.078+08:00","updated_at":"2019-09-07T10:22:19.078+08:00"},{"id":1590406,"file_name":"right_0.png","project_id":94076,"asset_id":28742,"created_at":"2019-09-07T10:22:19.079+08:00","updated_at":"2019-09-07T10:22:19.079+08:00"},{"id":1590407,"file_name":"right_1.png","project_id":94076,"asset_id":28743,"created_at":"2019-09-07T10:22:19.080+08:00","updated_at":"2019-09-07T10:22:19.080+08:00"},{"id":1590408,"file_name":"right_2.png","project_id":94076,"asset_id":28744,"created_at":"2019-09-07T10:22:19.081+08:00","updated_at":"2019-09-07T10:22:19.081+08:00"},{"id":1590409,"file_name":"right_3.png","project_id":94076,"asset_id":28745,"created_at":"2019-09-07T10:22:19.083+08:00","updated_at":"2019-09-07T10:22:19.083+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦