{"id":208517,"student_id":10,"content":"from game import *\nfrom random import randrange\n\nset_backdrop('bg.png')\n\nblocks = []\nskulls = []\ncoins = []\nclock = 0\ntarget = None\n\nfor x in range(24):\n for y in range(18):\n b = create_sprite('ice.png')\n b.x = 50 * x + 25\n b.y = 50 * y + 25\n blocks.append(b)\n\nfor i in range(30):\n c = create_sprite('coin.png')\n c.x = randrange(24) * 50 + 25\n c.y = randrange(18) * 50 + 25\n coins.append(c)\n\nfor i in range(10):\n s = create_sprite('skull.png')\n s.x = randrange(24) * 50 + 25\n s.y = randrange(18) * 50 + 25\n skulls.append(s)\n\nplayer = create_sprite('p1_0.png', 'p1_1.png')\nplayer.rotation_style = 'flipped'\n\n \ndef loop():\n global clock, target\n \n clock += 1\n if clock == 180:\n for s in skulls: s.opacity = 0.5\n for c in coins: c.opacity = 0.5\n \n if clock == 1800: stop()\n\n if cursor.is_down and player.touched(cursor):\n for s in skulls:\n if s.touched(cursor):\n s.opacity = 1\n stop()\n \n for c in coins:\n if c.touched(cursor):\n c.opacity = 1\n \n for b in blocks:\n if b.touched(cursor):\n b.hidden = True\n \n if cursor.is_down and player.distance_to(cursor) \u003e 5:\n player.toward(cursor)\n player.step_forward(3)\n player.costume_id = int(player.x / 10) % 2\n \nforever(loop)","created_at":"2020-11-30T10:53:04.826+08:00","updated_at":"2020-11-30T11:52:28.372+08:00","name":"極地挖挖挖","language":"python","screenshot":{"url":"https://cdn7.koding.school/uploads/project/screenshot/208517/772c53d26abab978f29417294348cef9.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":204,"hashid":"qmds88eq2","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3631511,"file_name":"coin.png","project_id":208517,"asset_id":287185,"created_at":"2020-11-30T10:54:13.327+08:00","updated_at":"2020-11-30T10:54:13.327+08:00"},{"id":3631512,"file_name":"skull.png","project_id":208517,"asset_id":30797,"created_at":"2020-11-30T10:54:16.622+08:00","updated_at":"2020-11-30T10:54:16.622+08:00"},{"id":3631513,"file_name":"p1_0.png","project_id":208517,"asset_id":287188,"created_at":"2020-11-30T10:54:47.648+08:00","updated_at":"2020-11-30T10:54:47.648+08:00"},{"id":3631514,"file_name":"p1_1.png","project_id":208517,"asset_id":287189,"created_at":"2020-11-30T10:54:47.650+08:00","updated_at":"2020-11-30T10:54:47.650+08:00"},{"id":3631509,"file_name":"bg.png","project_id":208517,"asset_id":287186,"created_at":"2020-11-30T10:53:40.790+08:00","updated_at":"2020-11-30T10:53:40.790+08:00"},{"id":3631510,"file_name":"ice.png","project_id":208517,"asset_id":287187,"created_at":"2020-11-30T10:53:40.792+08:00","updated_at":"2020-11-30T10:53:40.792+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦