1

我在 ursina 有一个动画对象。我想摧毁它。

from ursina import *
app = Ursina()
walka = Animation("assets/zombies/zombie1/walk/",fps = 5,loop=True)
animator1 =  Animator(animations= {"walk":walka})
animator1.state = "walk"
destroy(animator1)
app.run()

这似乎不起作用并引发此错误: AttributeError: 'Animator' object has no attribute 'eternal'

4

1 回答 1

0

做这个:

from ursina import *

app = Ursina()
walka = Animation("assets/zombies/zombie1/walk/", fps=5, loop=True)
animator1 = Animator(animations={"walk": walka})
animator1.state = "walk"
walka.disable() # disables the animation.

app.run()
于 2022-01-25T16:38:40.340 回答