{"id":10700,"student_id":10,"content":"","created_at":"2017-03-01T20:52:04.729+08:00","updated_at":"2019-11-07T19:19:11.677+08:00","name":"牛仔大對決","language":"javascript","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/10700/fe8c9d8d895d3d0f5672dfd387d852a2.jpg"},"parent_id":7485,"plugin":"setBackdrop('bg.png',0, 0, 640, 480);\nvar player_1 = createSprite({\n\tcostumes: [\"right_0.png\",\"right_1.png\",\"right_2.png\",\"right_3.png\"],\n x: 340,\n y: 400,\n scale: 1.3\n});\nvar player_2 = createSprite({\n\tcostumes: [\"left_0.png\",\"left_1.png\",\"left_2.png\",\"left_3.png\"],\n x: 300,\n y: 400,\n scale: 1.3\n});\nvar step = Math.random()*200 + 50;\nstep = Math.round(step);\n\n//-------------------------------------------------------//\nvar shot_1 = false;\nvar shot_2 = false;\nforever(function() {\n step = step - 1;\n if(step \u003e 0) {\n \tplayer_1.x += 1;\n player_2.x -= 1;\n }\n if(step === 0) {\n player_1.costumeId = 1;\n player_2.costumeId = 1;\n }\n if(key.enter \u0026\u0026 player_2.costumeId == 1 \u0026\u0026 !shot_1) {\n player_1.costumeId = 2;\n player_2.costumeId = 3;\n sound.play('shot.wav');\n }\n if(key.space \u0026\u0026 player_2.costumeId == 1 \u0026\u0026 !shot_2) {\n player_2.costumeId = 2;\n player_1.costumeId = 3;\n sound.play('shot.wav');\n }\n if(key.enter) {\n shot_1 = true;\n }\n if(key.space) {\n shot_2 = true;\n }\n});","description":"","note":"","status":"public","like_student_ids":[],"is_featured":false,"views":320,"hashid":"qmds8w9m","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":237224,"file_name":"bg.png","project_id":10700,"asset_id":26629,"created_at":"2017-09-04T16:07:13.690+08:00","updated_at":"2017-09-04T16:07:13.690+08:00"},{"id":237225,"file_name":"shot.wav","project_id":10700,"asset_id":26630,"created_at":"2017-09-04T16:07:13.694+08:00","updated_at":"2017-09-04T16:07:13.694+08:00"},{"id":237226,"file_name":"left_1.png","project_id":10700,"asset_id":26631,"created_at":"2017-09-04T16:07:13.698+08:00","updated_at":"2017-09-04T16:07:13.698+08:00"},{"id":237227,"file_name":"left_0.png","project_id":10700,"asset_id":26632,"created_at":"2017-09-04T16:07:13.702+08:00","updated_at":"2017-09-04T16:07:13.702+08:00"},{"id":237228,"file_name":"left_2.png","project_id":10700,"asset_id":26633,"created_at":"2017-09-04T16:07:13.705+08:00","updated_at":"2017-09-04T16:07:13.705+08:00"},{"id":237229,"file_name":"left_3.png","project_id":10700,"asset_id":26634,"created_at":"2017-09-04T16:07:13.708+08:00","updated_at":"2017-09-04T16:07:13.708+08:00"},{"id":237230,"file_name":"right_0.png","project_id":10700,"asset_id":26635,"created_at":"2017-09-04T16:07:13.712+08:00","updated_at":"2017-09-04T16:07:13.712+08:00"},{"id":237231,"file_name":"right_1.png","project_id":10700,"asset_id":26636,"created_at":"2017-09-04T16:07:13.714+08:00","updated_at":"2017-09-04T16:07:13.714+08:00"},{"id":237232,"file_name":"right_2.png","project_id":10700,"asset_id":26637,"created_at":"2017-09-04T16:07:13.717+08:00","updated_at":"2017-09-04T16:07:13.717+08:00"},{"id":237233,"file_name":"right_3.png","project_id":10700,"asset_id":26638,"created_at":"2017-09-04T16:07:13.721+08:00","updated_at":"2017-09-04T16:07:13.721+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
下載 Android APP (APK)
截圖
1:1:1
1:1
full
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦