{"id":202852,"student_id":10,"content":"from game import *\nimport random\n\nt1 = create_sprite('1.png', '2.png', '3.png')\nt2 = create_sprite('1.png', '2.png', '3.png')\nt3 = create_sprite('1.png', '2.png', '3.png')\nbg = create_sprite('building.png')\nshadow = create_sprite('shadow.png')\nshadow.hidden = True\n\nclock = 0\nkill = 0\nmiss = 0\n\ncreate_sound('bgm.mp3')\n\ndef loop():\n global clock, kill, miss\n clock += 1\n \n if clock % 120 == 0:\n t1.costume_id = random.randrange(2)\n t1.x = random.randrange(6) * 200 + 100\n t1.y = random.randrange(4) * 200 + 130\n \n if clock % 120 == 40:\n t2.costume_id = random.randrange(2)\n t2.x = random.randrange(6) * 200 + 100\n t2.y = random.randrange(4) * 200 + 130\n \n \n if clock % 120 == 80:\n t3.costume_id = random.randrange(2)\n t3.x = random.randrange(6) * 200 + 100\n t3.y = random.randrange(4) * 200 + 130\n \n if cursor.is_down and t1.touched(cursor) and t1.costume_id != 2:\n if t1.costume_id == 1: kill += 1\n else: miss += 1\n t1.costume_id = 2\n create_sound('shot.mp3')\n \n if cursor.is_down and t2.touched(cursor) and t2.costume_id != 2:\n if t2.costume_id == 1: kill += 1\n else: miss += 1\n t2.costume_id = 2\n create_sound('shot.mp3')\n \n if cursor.is_down and t3.touched(cursor) and t3.costume_id != 2:\n if t3.costume_id == 1: kill += 1\n else: miss += 1\n t3.costume_id = 2\n create_sound('shot.mp3')\n \n if clock == 3600:\n draw_text('擊殺: ' + str(kill), 10, 10, 'black', 40)\n draw_text('誤殺: ' + str(miss), 10, 60, 'black', 40)\n shadow.hidden = True\n stop()\n \n shadow.x = cursor.x\n shadow.y = cursor.y\n\nforever(loop)","created_at":"2020-11-09T15:55:42.183+08:00","updated_at":"2020-12-09T11:09:53.330+08:00","name":"狙擊之王","language":"python","screenshot":{"url":"https://cdn3.koding.school/uploads/project/screenshot/202852/2c6cb08cc47ec04f2f7e8a553a0f9ae0.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":222,"hashid":"wdks4vyqj","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3503536,"file_name":"1.png","project_id":202852,"asset_id":280213,"created_at":"2020-11-09T16:31:33.690+08:00","updated_at":"2020-11-09T16:31:33.690+08:00"},{"id":3503565,"file_name":"3.png","project_id":202852,"asset_id":280217,"created_at":"2020-11-09T17:00:11.043+08:00","updated_at":"2020-11-09T17:00:11.043+08:00"},{"id":3503460,"file_name":"0.png","project_id":202852,"asset_id":280206,"created_at":"2020-11-09T15:56:00.635+08:00","updated_at":"2020-11-09T15:56:00.635+08:00"},{"id":3503532,"file_name":"building.png","project_id":202852,"asset_id":280209,"created_at":"2020-11-09T16:21:44.293+08:00","updated_at":"2020-11-09T16:21:44.293+08:00"},{"id":3503564,"file_name":"bgm.mp3","project_id":202852,"asset_id":280216,"created_at":"2020-11-09T16:57:26.172+08:00","updated_at":"2020-11-09T16:57:26.172+08:00"},{"id":3503533,"file_name":"shadow.png","project_id":202852,"asset_id":280210,"created_at":"2020-11-09T16:28:54.840+08:00","updated_at":"2020-11-09T16:28:54.840+08:00"},{"id":3503535,"file_name":"2.png","project_id":202852,"asset_id":280212,"created_at":"2020-11-09T16:30:54.982+08:00","updated_at":"2020-11-09T16:30:54.982+08:00"},{"id":3503539,"file_name":"shot.mp3","project_id":202852,"asset_id":280214,"created_at":"2020-11-09T16:37:46.772+08:00","updated_at":"2020-11-09T16:37:46.772+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦