{"id":163269,"student_id":1404,"content":"import game\n# 角色設定及初始化\nbg = createSprite('bg2.jpg', 'bg3.jpg', 'bg4.jpg')\nplayer = createSprite('1.png', '2.png', '3.png')\n\n\ndef pullLeft ():\n # 左拉\n player.x = player.x - 10\n if player.x \u003c 280:\n #左贏\n player.costume_id = 1\n bg.costume_id = 1\n game.stop()\n\ndef pullRight ():\n # 右拉\n player.x = player.x + 10\n if player.x \u003e 360:\n #右贏\n player.costume_id = 2\n bg.costume_id = 2\n game.stop()\n\n# space按下判斷\ngame.on(\"keydown\", \"space\", pullLeft)\n\n# enter按下判斷\ngame.on(\"keydown\", \"enter\", pullRight)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# def pullLeft ():\n# player.x -= 10 \n# if player.x \u003c 280:\n# player.costumeId = 1\n# bg.costumeId = 1\n# stop()\n\n# def pullRight ():\n# player.x += 10\n# if player.x \u003e 360:\n# player.costumeId = 2\n# bg.costumeId = 2\n# stop()\n\n# on('keydown', 'space', pullLeft)\n# on('keydown', 'enter', pullRight)\n","created_at":"2020-07-09T11:09:54.147+08:00","updated_at":"2020-07-20T16:41:04.125+08:00","name":"拔河_S 副本","language":"python","screenshot":{"url":"https://cdn8.koding.school/uploads/project/screenshot/163269/499ea8e66f87015a6cf8bbb3a6e30fdb.jpg"},"parent_id":162821,"plugin":"game.set({'width': 640, 'height': 480})","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":75,"hashid":"qmdsq4v5","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":2836556,"file_name":"1.png","project_id":163269,"asset_id":176428,"created_at":"2020-07-09T11:09:54.152+08:00","updated_at":"2020-07-09T11:09:54.152+08:00"},{"id":2836557,"file_name":"2.png","project_id":163269,"asset_id":176429,"created_at":"2020-07-09T11:09:54.153+08:00","updated_at":"2020-07-09T11:09:54.153+08:00"},{"id":2836558,"file_name":"3.png","project_id":163269,"asset_id":176430,"created_at":"2020-07-09T11:09:54.154+08:00","updated_at":"2020-07-09T11:09:54.154+08:00"},{"id":2836559,"file_name":"bg1.jpg","project_id":163269,"asset_id":176431,"created_at":"2020-07-09T11:09:54.155+08:00","updated_at":"2020-07-09T11:09:54.155+08:00"},{"id":2836560,"file_name":"bg2.jpg","project_id":163269,"asset_id":176432,"created_at":"2020-07-09T11:09:54.156+08:00","updated_at":"2020-07-09T11:09:54.156+08:00"},{"id":2836561,"file_name":"bg3.jpg","project_id":163269,"asset_id":176433,"created_at":"2020-07-09T11:09:54.157+08:00","updated_at":"2020-07-09T11:09:54.157+08:00"},{"id":2836562,"file_name":"bg4.jpg","project_id":163269,"asset_id":176434,"created_at":"2020-07-09T11:09:54.157+08:00","updated_at":"2020-07-09T11:09:54.157+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦