{"id":21386,"student_id":34,"content":"setBackdrop('bg.png',0, 0, 640, 480);\nvar p1 = createSprite([\"right_0.png\",\"right_1.png\",\"right_2.png\",\"right_3.png\"]);\np1.x = 340;\np1.y = 400,\np1.scale = 1.3;\nvar p2 = createSprite([\"left_0.png\",\"left_1.png\",\"left_2.png\",\"left_3.png\"]);\np2.x = 300;\np2.y = 400; \nvar step = Math.random()*200 + 50;\nstep = Math.round(step);\nvar p1shot=5;\nvar p2shot=5;\nvar p1wait=0;\nvar p2wait=0;\nvar p1dead=false;\nvar p2dead=false;\nvar p1score=0;\nvar p2score=0;\nforever (function() {\n if(step\u003e0){\n p1.x+=1;\n p2.x-=1;\n step-=1;\n if(step==0){\n p2.costumeId=1;\n p1.costumeId=1;\n }\n }\n //p1\n if (key.space \u0026\u0026 p1shot\u003e0 \u0026\u0026 p1wait == 0 \u0026\u0026 p1dead == false){\n sound.play('shot.wav');\n if (step == 0) {\n p2.costumeId=2;\n p1.costumeId=3;\n p2dead = true;\n p1score++;\n }\n p1shot--;\n p1wait = 30;\n }\n //p2\n if( key.enter \u0026\u0026 p2shot\u003e0 \u0026\u0026 p2wait == 0 \u0026\u0026 p2dead == false){\n sound.play('shot.wav');\n if(step == 0){\n p1.costumeId=2;\n p2.costumeId=3;\n p1dead = true;\n p2score++;\n }\n p2shot--;\n p2wait = 30;\n }\n if(key.r){\n p1.x = 340;\n p1.y = 400,\n p1.scale = 1.3;\n p2.x = 300;\n p2.y = 400; \n step = Math.random()*200 + 50;\n step = Math.round(step);\n p1shot=5;\n p2shot=5;\n p1wait=0;\n p2wait=0;\n p1dead=false;\n p2dead=false;\n p2.costumeId=1;\n p1.costumeId=1;\n } \n print(p2score,480,0,\"red\",100);\n print(p1score,110,0,\"red\",100);\n if (p1wait \u003e 0) {\n p1wait--;\n }\n if(p2wait \u003e 0){\n p2wait--\n }\n});","created_at":"2018-02-02T18:18:02.504+08:00","updated_at":"2019-10-25T19:11:52.477+08:00","name":"牛仔大對決","language":"javascript","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/21386/b6cabf1e1f2ce4210c55bd66f0201bab.jpg"},"parent_id":10701,"plugin":"","description":"","note":"","status":"public","like_student_ids":[],"is_featured":false,"views":168,"hashid":"d5msy682","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":415163,"file_name":"bg.png","project_id":21386,"asset_id":28736,"created_at":"2018-02-02T18:18:02.514+08:00","updated_at":"2018-02-02T18:18:02.514+08:00"},{"id":415164,"file_name":"shot.wav","project_id":21386,"asset_id":28737,"created_at":"2018-02-02T18:18:02.517+08:00","updated_at":"2018-02-02T18:18:02.517+08:00"},{"id":415165,"file_name":"left_1.png","project_id":21386,"asset_id":28738,"created_at":"2018-02-02T18:18:02.519+08:00","updated_at":"2018-02-02T18:18:02.519+08:00"},{"id":415166,"file_name":"left_0.png","project_id":21386,"asset_id":28739,"created_at":"2018-02-02T18:18:02.521+08:00","updated_at":"2018-02-02T18:18:02.521+08:00"},{"id":415167,"file_name":"left_2.png","project_id":21386,"asset_id":28740,"created_at":"2018-02-02T18:18:02.523+08:00","updated_at":"2018-02-02T18:18:02.523+08:00"},{"id":415168,"file_name":"left_3.png","project_id":21386,"asset_id":28741,"created_at":"2018-02-02T18:18:02.524+08:00","updated_at":"2018-02-02T18:18:02.524+08:00"},{"id":415169,"file_name":"right_0.png","project_id":21386,"asset_id":28742,"created_at":"2018-02-02T18:18:02.526+08:00","updated_at":"2018-02-02T18:18:02.526+08:00"},{"id":415170,"file_name":"right_1.png","project_id":21386,"asset_id":28743,"created_at":"2018-02-02T18:18:02.528+08:00","updated_at":"2018-02-02T18:18:02.528+08:00"},{"id":415171,"file_name":"right_2.png","project_id":21386,"asset_id":28744,"created_at":"2018-02-02T18:18:02.530+08:00","updated_at":"2018-02-02T18:18:02.530+08:00"},{"id":415172,"file_name":"right_3.png","project_id":21386,"asset_id":28745,"created_at":"2018-02-02T18:18:02.532+08:00","updated_at":"2018-02-02T18:18:02.532+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
繁中
简中
English
日本語
1:1:1
1:1
全寬
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦