-1
我一直在爲此苦苦掙扎,想問一問。我從https://github.com/ddorn/GUI下載了pygame GUI。基本上,問題是當你嘗試使用它此錯誤時:pygame GUI python3.6
if e.key == K_RIGHT:
AttributeError: 'Event' object has no attribute 'key'
我試圖改變e.key
到o.key
,但什麼都沒有發生。彈出同樣的錯誤。我試圖聯繫作者,但失敗了。請幫忙。
什麼是'e'?你的代碼片段的上下文是什麼? – Matthias
e.key在for循環中基本上將e設置爲pygame.event.get()。 –