{"id":208516,"student_id":10,"content":"from game import *\nfrom random import randrange\n\nset_backdrop('bg.png')\n\nskulls = []\ncoins = []\nclock = 0\n\ncircle = create_sprite('circle.png')\n\nfor i in range(30):\n c = create_sprite('coin.png')\n c.x = randrange(24) * 50\n c.y = randrange(18) * 50\n coins.append(c)\n\nfor i in range(10):\n s = create_sprite('skull.png')\n s.x = randrange(24) * 50\n s.y = randrange(18) * 50\n skulls.append(s)\n \ndef loop():\n global clock\n \n circle.x = cursor.x\n circle.y = cursor.y\n \n clock += 1\n if clock == 180:\n for s in skulls: s.opacity = 0.1\n for c in coins: c.opacity = 0.1\n \n for s in skulls:\n if s.touched(circle) and cursor.is_down:\n s.opacity = 1\n stop()\n for c in coins:\n if c.touched(circle) and cursor.is_down:\n c.opacity = 1\n \n if cursor.is_down and clock % 5 == 0:\n c = create_sprite('circle.png')\n c.x = cursor.x\n c.y = cursor.y\n c.layer = -1\n \nforever(loop)","created_at":"2020-11-30T10:34:48.947+08:00","updated_at":"2020-11-30T11:26:38.488+08:00","name":"金幣挖挖挖","language":"python","screenshot":{"url":"https://cdn6.koding.school/uploads/project/screenshot/208516/f0a8a766aa333aa0f071ebc998c25080.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":210,"hashid":"9ygspp3mg","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3631501,"file_name":"bg.png","project_id":208516,"asset_id":287184,"created_at":"2020-11-30T10:35:50.895+08:00","updated_at":"2020-11-30T10:35:50.895+08:00"},{"id":3631502,"file_name":"circle.png","project_id":208516,"asset_id":30800,"created_at":"2020-11-30T10:35:50.899+08:00","updated_at":"2020-11-30T10:35:50.899+08:00"},{"id":3631503,"file_name":"coin.png","project_id":208516,"asset_id":287185,"created_at":"2020-11-30T10:35:51.512+08:00","updated_at":"2020-11-30T10:35:51.512+08:00"},{"id":3631504,"file_name":"skull.png","project_id":208516,"asset_id":30797,"created_at":"2020-11-30T10:35:51.513+08:00","updated_at":"2020-11-30T10:35:51.513+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦