{"id":14657,"student_id":10,"content":"setBackdrop('bg.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\"]);\np1.moveTo(340, 400);\np2.moveTo(340, 400);\n\nvar steps = Math.floor(Math.random()*200 + 50);\nvar p1_fired = false;\nvar p2_fired = false;\n\nforever(function() {\n\n if(steps \u003e 0) {\n steps -= 1;\n \tp1.x += 1;\n p2.x -= 1;\n }\n if(steps == 0 \u0026\u0026 p1.costumeId == 0) {\n p1.costumeId = 1;\n p2.costumeId = 1;\n }\n if(key.enter \u0026\u0026 p2.costumeId == 1 \u0026\u0026 !p1_fired) {\n p1.costumeId = 2;\n p2.costumeId = 3;\n sound.play('shot.wav');\n }\n if(key.space \u0026\u0026 p2.costumeId == 1 \u0026\u0026 !p2_fired) {\n p2.costumeId = 2;\n p1.costumeId = 3;\n sound.play('shot.wav');\n }\n if(key.enter) {\n p1_fired = true;\n }\n if(key.space) {\n p2_fired = true;\n }\n if(key.r) {\n p1.costumeId = 0;\n p2.costumeId = 0;\n p1.moveTo(340, 400);\n p2.moveTo(340, 400);\n steps = Math.floor(Math.random()*200 + 50);\n p1_fired = false;\n p2_fired = false;\n }\n\n});","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-12-16T15:05:05.252+08:00","name":"牛仔大對決_修復版","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/14657/16ef62c466fbd4491159e4cd32acd083.jpg"},"parent_id":10701,"plugin":"","description":"","note":"","status":"public","like_student_ids":[],"is_featured":false,"views":377,"hashid":"d5msvz9m","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":303821,"file_name":"shot.wav","project_id":14657,"asset_id":28737,"created_at":"2017-11-04T10:49:37.616+08:00","updated_at":"2017-11-04T10:49:37.616+08:00"},{"id":303822,"file_name":"left_1.png","project_id":14657,"asset_id":28738,"created_at":"2017-11-04T10:49:37.618+08:00","updated_at":"2017-11-04T10:49:37.618+08:00"},{"id":303823,"file_name":"left_0.png","project_id":14657,"asset_id":28739,"created_at":"2017-11-04T10:49:37.619+08:00","updated_at":"2017-11-04T10:49:37.619+08:00"},{"id":303824,"file_name":"left_2.png","project_id":14657,"asset_id":28740,"created_at":"2017-11-04T10:49:37.621+08:00","updated_at":"2017-11-04T10:49:37.621+08:00"},{"id":303825,"file_name":"left_3.png","project_id":14657,"asset_id":28741,"created_at":"2017-11-04T10:49:37.622+08:00","updated_at":"2017-11-04T10:49:37.622+08:00"},{"id":303826,"file_name":"right_0.png","project_id":14657,"asset_id":28742,"created_at":"2017-11-04T10:49:37.624+08:00","updated_at":"2017-11-04T10:49:37.624+08:00"},{"id":303827,"file_name":"right_1.png","project_id":14657,"asset_id":28743,"created_at":"2017-11-04T10:49:37.625+08:00","updated_at":"2017-11-04T10:49:37.625+08:00"},{"id":303828,"file_name":"right_2.png","project_id":14657,"asset_id":28744,"created_at":"2017-11-04T10:49:37.627+08:00","updated_at":"2017-11-04T10:49:37.627+08:00"},{"id":303829,"file_name":"right_3.png","project_id":14657,"asset_id":28745,"created_at":"2017-11-04T10:49:37.628+08:00","updated_at":"2017-11-04T10:49:37.628+08:00"},{"id":1961723,"file_name":"bg.png","project_id":14657,"asset_id":172230,"created_at":"2019-12-16T14:40:02.449+08:00","updated_at":"2019-12-16T14:40:02.449+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦