{"id":189995,"student_id":10,"content":"import game\n\narrow = game.create_sprite(\"arrow.png\") #創造角色\ntarget = game.create_sprite(\"target.png\") #創造角色\n\ntarget.x = 1000\narrow.x = 200\nstatus = 0\nturn = 1\nspeed = 0\n\ndef loop ():\n global status, turn, speed\n \n if arrow.direction \u003e 135 or arrow.direction \u003c 45:\n turn = -turn\n \n if status == 0:\n arrow.direction += turn\n \n if cursor.is_down:\n status = 1\n \n if status == 1 and speed \u003c 10:\n speed += 0.3\n \n if status == 1 and cursor.is_down == False: status = 2\n \n if status == 2:\n arrow.step_forward(speed)\n arrow.direction += 0.4\n \n if arrow.touched(target): reset()\n \n if arrow.x \u003e 1200 or arrow.y \u003e 900: reset()\n \n game.draw_text('speed:' + str(speed))\n \n\ndef reset():\n global status, turn, speed\n status = 0\n arrow.x = 200\n arrow.y = 450\n speed = 0\n arrow.direction = 90\n\ngame.game.forever(loop) #重複不斷執行","created_at":"2020-09-08T18:14:58.439+08:00","updated_at":"2020-09-08T18:34:36.268+08:00","name":"w","language":"python","screenshot":{"url":"https://cdn9.koding.school/uploads/project/screenshot/189995/06da80b981aaf7cf9ecd6b5e49045b26.jpg"},"parent_id":4,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":226,"hashid":"5j3sgey4","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3234387,"file_name":"arrow.png","project_id":189995,"asset_id":260140,"created_at":"2020-09-08T18:18:02.173+08:00","updated_at":"2020-09-08T18:18:02.173+08:00"},{"id":3234388,"file_name":"target.png","project_id":189995,"asset_id":260141,"created_at":"2020-09-08T18:18:02.175+08:00","updated_at":"2020-09-08T18:18:02.175+08:00"}]
橘蘋學習平台
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
幫助
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦