{"id":1023844,"student_id":2589,"content":"import game\nimport random\n\ngame.create_sprite('bg_0.png')\ngame.create_sprite('bg_1.png')\n\np1 = game.create_sprite('p1_0.png', 'p1_1.png', 'p1_2.png', 'p1_3.png')\np2 = game.create_sprite('p2_0.png', 'p2_1.png', 'p2_2.png', 'p2_3.png')\n\np1.move_to(600, 700)\np2.move_to(600, 700)\n\nsteps = random.randint(100, 500)\np1_fired = False\np2_fired = False\n\n\ndef loop():\n global steps, p1_fired, p2_fired\n\n if steps \u003e 0:\n p1.x = p1.x - 1\n p2.x = p2.x + 1\n steps = steps - 1\n\n if steps == 0 and p1.costume_id == 0:\n p1.costume_id = 1\n p2.costume_id = 1\n \n if game.key.space == True and p1.costume_id == 1 and p1_fired == False:\n p1.costume_id = 2\n p2.costume_id = 3\n \n if game.key.enter == True and p2.costume_id == 1 and p2_fired == False:\n p1.costume_id = 3\n p2.costume_id = 2\n \n if game.key.space == True:\n p1_fired = True\n\n if game.key.enter == True:\n p2_fired = True\n\n if game.key.r == True:\n p1.move_to(600, 700)\n p2.move_to(600, 700)\n p1.costume_id = 0\n p2.costume_id = 0\n p1_fired = False\n p2_fired = False\n steps = random.randint(100, 500)\n\n\nforever(loop)\n","created_at":"2025-05-29T12:05:43.881+08:00","updated_at":"2025-05-29T12:08:38.845+08:00","name":"8_B_A_牛仔大對決_綜合練習_【講解】遊戲重新開始 副本","language":"python","screenshot":{"url":null},"parent_id":1011942,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":89,"hashid":"4y3s995q6","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":38686370,"file_name":"shot.wav","project_id":1023844,"asset_id":251747,"created_at":"2025-05-29T12:05:43.887+08:00","updated_at":"2025-05-29T12:05:43.887+08:00"},{"id":38686371,"file_name":"p2_3.png","project_id":1023844,"asset_id":251748,"created_at":"2025-05-29T12:05:43.888+08:00","updated_at":"2025-05-29T12:05:43.888+08:00"},{"id":38686372,"file_name":"p2_2.png","project_id":1023844,"asset_id":251749,"created_at":"2025-05-29T12:05:43.890+08:00","updated_at":"2025-05-29T12:05:43.890+08:00"},{"id":38686373,"file_name":"p2_1.png","project_id":1023844,"asset_id":251750,"created_at":"2025-05-29T12:05:43.891+08:00","updated_at":"2025-05-29T12:05:43.891+08:00"},{"id":38686374,"file_name":"p2_0.png","project_id":1023844,"asset_id":251751,"created_at":"2025-05-29T12:05:43.892+08:00","updated_at":"2025-05-29T12:05:43.892+08:00"},{"id":38686375,"file_name":"p1_3.png","project_id":1023844,"asset_id":251752,"created_at":"2025-05-29T12:05:43.893+08:00","updated_at":"2025-05-29T12:05:43.893+08:00"},{"id":38686376,"file_name":"p1_2.png","project_id":1023844,"asset_id":251753,"created_at":"2025-05-29T12:05:43.894+08:00","updated_at":"2025-05-29T12:05:43.894+08:00"},{"id":38686377,"file_name":"p1_1.png","project_id":1023844,"asset_id":251754,"created_at":"2025-05-29T12:05:43.895+08:00","updated_at":"2025-05-29T12:05:43.895+08:00"},{"id":38686378,"file_name":"p1_0.png","project_id":1023844,"asset_id":251755,"created_at":"2025-05-29T12:05:43.896+08:00","updated_at":"2025-05-29T12:05:43.896+08:00"},{"id":38686379,"file_name":"info.png","project_id":1023844,"asset_id":251756,"created_at":"2025-05-29T12:05:43.897+08:00","updated_at":"2025-05-29T12:05:43.897+08:00"},{"id":38686380,"file_name":"cloud_3.png","project_id":1023844,"asset_id":251757,"created_at":"2025-05-29T12:05:43.898+08:00","updated_at":"2025-05-29T12:05:43.898+08:00"},{"id":38686381,"file_name":"cloud_2.png","project_id":1023844,"asset_id":251758,"created_at":"2025-05-29T12:05:43.899+08:00","updated_at":"2025-05-29T12:05:43.899+08:00"},{"id":38686382,"file_name":"cloud_1.png","project_id":1023844,"asset_id":251759,"created_at":"2025-05-29T12:05:43.901+08:00","updated_at":"2025-05-29T12:05:43.901+08:00"},{"id":38686383,"file_name":"bgm.mp3","project_id":1023844,"asset_id":251760,"created_at":"2025-05-29T12:05:43.902+08:00","updated_at":"2025-05-29T12:05:43.902+08:00"},{"id":38686384,"file_name":"bg_1.png","project_id":1023844,"asset_id":251761,"created_at":"2025-05-29T12:05:43.903+08:00","updated_at":"2025-05-29T12:05:43.903+08:00"},{"id":38686385,"file_name":"bg_0.png","project_id":1023844,"asset_id":251762,"created_at":"2025-05-29T12:05:43.904+08:00","updated_at":"2025-05-29T12:05:43.904+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦