{"id":228603,"student_id":2002,"content":"import game #載入遊戲框架\n\ngame.set_backdrop('bg.png') #設定背景圖\nmaze = game.create_sprite('1.png', '2.png', '3.png', '4.png', 'youwin.png') #遊戲關卡\nwheel = game.create_sprite('wheel.png') #轉盤\nt1 = game.create_sprite(\"t1.png\") #創造角色\nt2 = game.create_sprite(\"t2.png\") #創造角色\nt3 = game.create_sprite(\"t3.png\") #創造角色\nt4 = game.create_sprite(\"t4.png\") #創造角色\nplayer = game.create_sprite('player.png') #發光的小精靈\nt1.move_to(1200, 900)\nt2.move_to(0, 900)\nt3.move_to(1200, 0)\nt4.move_to(0, 0)\nplayer.move_to(50, 50)\nactive = False\ncount = 0 \ngame.create_sound(\"bgm.mp3\", True)\n# 遊戲迴圈\ndef loop ():\n global active, count, t1, t2, t3, t4\n wheel.direction += 0.5\n t1.direction -= 0.2\n t2.direction -= 0.2\n t2.direction -= 0.2\n t4.direction -= 0.2\n if active == True:\n player.x = game.cursor.x\n player.y = game.cursor.y\n count += 1\n if player.touched(game.cursor):\n active = True\n if player.touched(t1):\n maze.costume_id = 1\n player.move_to(1150, 850)\n active = False\n if player.touched(t2):\n maze.costume_id = 2\n player.move_to(50, 850)\n active = False\n if player.touched(t3):\n maze.costume_id = 3\n player.move_to(1150, 50)\n active = False\n if player.touched(t4) and maze.costume_id == 3:\n wheel.hidden = True\n maze.costume_id = 4\n stop()\n if player.touched(maze) or player.touched(wheel):\n player.move_to(50, 50)\n active = False\n game.create_sound(\"hit.ogg\")\n game.draw_text(\"遊戲時間:\" + str(count//60), 500, 30, \"white\", 30)\ngame.forever(loop) #不斷重複執行遊戲迴圈\n","created_at":"2021-02-07T13:28:56.435+08:00","updated_at":"2021-02-07T15:02:44.364+08:00","name":"逃離洞窟(預設版) 副本","language":"python","screenshot":{"url":"https://cdn4.koding.school/uploads/project/screenshot/228603/0baa880d451eb1f985afad5817137c75.jpg"},"parent_id":183419,"plugin":"game.set({'width': 1200, 'height': 900})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":86,"hashid":"meysw985d","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":4084510,"file_name":"3.png","project_id":228603,"asset_id":251876,"created_at":"2021-02-07T13:28:56.440+08:00","updated_at":"2021-02-07T13:28:56.440+08:00"},{"id":4084511,"file_name":"bgm.mp3","project_id":228603,"asset_id":251877,"created_at":"2021-02-07T13:28:56.441+08:00","updated_at":"2021-02-07T13:28:56.441+08:00"},{"id":4084512,"file_name":"hit.ogg","project_id":228603,"asset_id":251878,"created_at":"2021-02-07T13:28:56.442+08:00","updated_at":"2021-02-07T13:28:56.442+08:00"},{"id":4084513,"file_name":"youwin.png","project_id":228603,"asset_id":251879,"created_at":"2021-02-07T13:28:56.443+08:00","updated_at":"2021-02-07T13:28:56.443+08:00"},{"id":4084514,"file_name":"wheel.png","project_id":228603,"asset_id":251880,"created_at":"2021-02-07T13:28:56.444+08:00","updated_at":"2021-02-07T13:28:56.444+08:00"},{"id":4084515,"file_name":"t4.png","project_id":228603,"asset_id":251881,"created_at":"2021-02-07T13:28:56.445+08:00","updated_at":"2021-02-07T13:28:56.445+08:00"},{"id":4084516,"file_name":"t3.png","project_id":228603,"asset_id":251882,"created_at":"2021-02-07T13:28:56.446+08:00","updated_at":"2021-02-07T13:28:56.446+08:00"},{"id":4084517,"file_name":"t2.png","project_id":228603,"asset_id":251883,"created_at":"2021-02-07T13:28:56.447+08:00","updated_at":"2021-02-07T13:28:56.447+08:00"},{"id":4084518,"file_name":"t1.png","project_id":228603,"asset_id":251884,"created_at":"2021-02-07T13:28:56.448+08:00","updated_at":"2021-02-07T13:28:56.448+08:00"},{"id":4084519,"file_name":"player.png","project_id":228603,"asset_id":251885,"created_at":"2021-02-07T13:28:56.448+08:00","updated_at":"2021-02-07T13:28:56.448+08:00"},{"id":4084520,"file_name":"bg.png","project_id":228603,"asset_id":251886,"created_at":"2021-02-07T13:28:56.449+08:00","updated_at":"2021-02-07T13:28:56.449+08:00"},{"id":4084521,"file_name":"4.png","project_id":228603,"asset_id":251887,"created_at":"2021-02-07T13:28:56.450+08:00","updated_at":"2021-02-07T13:28:56.450+08:00"},{"id":4084522,"file_name":"2.png","project_id":228603,"asset_id":251888,"created_at":"2021-02-07T13:28:56.451+08:00","updated_at":"2021-02-07T13:28:56.451+08:00"},{"id":4084523,"file_name":"1.png","project_id":228603,"asset_id":251889,"created_at":"2021-02-07T13:28:56.452+08:00","updated_at":"2021-02-07T13:28:56.452+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦