我想有一個遊戲多龜。烏龜是主角,怪物是我添加的另一隻烏龜。如何給它添加一個形狀。繼承人的代碼:Python多龜形
import turtle
monster = turtle.Turtle()
monster.addshape('enemt.gif')
monster.shape('enemt.gif')
monster.goto(0, 0)
我得到的錯誤
Traceback (most recent call last):
File "C:\Users\Alfie\Desktop\Tutorial Game\Tutorial Game.py", line 77, in <module>
monster.addshape('enemt.gif')
AttributeError: 'Turtle' object has no attribute 'addshape'
'addShape'工作嗎?名稱區分大小寫。 –
不,它不。同樣的錯誤再次 –