{"id":192144,"student_id":12205,"content":"setBackdrop('bg.png', 0, 0, 640, 480);\nvar qrcode = createSprite(\"qrcode.png\");\nvar p1 = createSprite([\"right_0.png\", \"right_1.png\", \"right_2.png\", \"right_3.png\"]);\nvar p2 = createSprite([\"left_0.png\", \"left_1.png\", \"left_2.png\", \"left_3.png\"]);\nqrcode.x = 535;\nqrcode.y =100;\nqrcode.scale = 0.5;\nvar step = Math.random()*0 + 50;\nstep = Math.round(step);\nvar score1 = 0;\nvar score2 = 0;\ninit();\n\nforever(function() {\n print(step, 50, 100, \"red\", 50);\n move();\n fire();\n if (p1.costumeId == 3 || p2.costumeId == 3) {\n print('按下q鍵再玩一局',160,240,\"red\",50);\n if (key.q) {\n init();\n }\n }\n print(\"a分數: \" + score1, 20, 20, 'white', 30);\n print(\"b分數: \" + score2, 20, 50, 'white', 30);\n \n});\nfunction move() {\n if (step \u003e 0) {\n p1.x += 1;\n p2.x -= 1;\n step -= 1;\n }\n if (step == 0 \u0026\u0026 p1.costumeId == 0) {\n p1.costumeId = 1;\n p2.costumeId = 1;\n \n }\n}\nfunction fire() {\n if (key.enter \u0026\u0026 p1.costumeId == 1) {\n p1.costumeId = 2;\n p2.costumeId = 3;\n sound.play(\"shot.wav\");\n score1 += 1;\n print(\"b lose\",200,170,\"red\",100);\n }\n if (key.space \u0026\u0026 p2.costumeId == 1) {\n p1.costumeId = 3;\n p2.costumeId = 2;\n sound.play(\"shot.wav\");\n score2 += 1;\n print(\"a lose\",200,170,\"red\",100);\n }\n}\nfunction init() {\n p1.x = 340;\n p1.y = 400;\n p2.x = 300;\n p2.y = 400;\n p1.costumeId = 0;\n p2.costumeId = 0;\n step = Math.random()*0 + 0;\n step = Math.round(step);\n}","created_at":"2020-09-18T19:05:34.666+08:00","updated_at":"2020-09-18T21:05:10.331+08:00","name":"牛仔大對決 副本","language":"javascript","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/192144/9128fef0bdb3f4bee84b592727888fa5.jpg"},"parent_id":10701,"plugin":"","description":"","note":"","status":"public","like_student_ids":[],"is_featured":false,"views":30,"hashid":"jzmsqvmv","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3277903,"file_name":"bg.png","project_id":192144,"asset_id":28736,"created_at":"2020-09-18T19:05:34.672+08:00","updated_at":"2020-09-18T19:05:34.672+08:00"},{"id":3277904,"file_name":"shot.wav","project_id":192144,"asset_id":28737,"created_at":"2020-09-18T19:05:34.675+08:00","updated_at":"2020-09-18T19:05:34.675+08:00"},{"id":3277905,"file_name":"left_1.png","project_id":192144,"asset_id":28738,"created_at":"2020-09-18T19:05:34.676+08:00","updated_at":"2020-09-18T19:05:34.676+08:00"},{"id":3277906,"file_name":"left_0.png","project_id":192144,"asset_id":28739,"created_at":"2020-09-18T19:05:34.678+08:00","updated_at":"2020-09-18T19:05:34.678+08:00"},{"id":3277907,"file_name":"left_2.png","project_id":192144,"asset_id":28740,"created_at":"2020-09-18T19:05:34.680+08:00","updated_at":"2020-09-18T19:05:34.680+08:00"},{"id":3277908,"file_name":"left_3.png","project_id":192144,"asset_id":28741,"created_at":"2020-09-18T19:05:34.682+08:00","updated_at":"2020-09-18T19:05:34.682+08:00"},{"id":3277909,"file_name":"right_0.png","project_id":192144,"asset_id":28742,"created_at":"2020-09-18T19:05:34.684+08:00","updated_at":"2020-09-18T19:05:34.684+08:00"},{"id":3277910,"file_name":"right_1.png","project_id":192144,"asset_id":28743,"created_at":"2020-09-18T19:05:34.685+08:00","updated_at":"2020-09-18T19:05:34.685+08:00"},{"id":3277911,"file_name":"right_2.png","project_id":192144,"asset_id":28744,"created_at":"2020-09-18T19:05:34.687+08:00","updated_at":"2020-09-18T19:05:34.687+08:00"},{"id":3277912,"file_name":"right_3.png","project_id":192144,"asset_id":28745,"created_at":"2020-09-18T19:05:34.688+08:00","updated_at":"2020-09-18T19:05:34.688+08:00"},{"id":3279181,"file_name":"qrcode.png","project_id":192144,"asset_id":262822,"created_at":"2020-09-18T20:53:50.114+08:00","updated_at":"2020-09-18T20:56:10.747+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦