My Entity animation doesn't work. How can I fix it?
class Ateset(Entity):
def __init__(self, position, target, **kwargs):
super().__init__(
model='quad',
texture='rock.png',
collider='sphere',
position=position,
**kwargs
)
self.animate_position(
target,
duration=1,
)
def input(key):
if key == 'q':
mouse_position = mouse.world_point
Energy.value -= 20
Energy.text = "Enerji: " + str(Energy.value)
ateset = Ateset(
position=(player.x, player.y, -1),
target=Vec3(mouse_position.x, mouse_position.y, -1))
The error I get:
I have this error File "C:\Users\beek6\PycharmProjects\Test\venv\Lib\site-packages\ursina\main.py", line 176, in input
__main__.input(key) File "C:\Users\beek6\PycharmProjects\Test\oyun\main.py", line 298, in input
Ateset( TypeError: 'NoneType' object is not callable
I holding key q and ı get this error. What can i do for this error?
source https://stackoverflow.com/questions/75975704/my-entity-animation-doesnt-work-how-can-i-fix-it
Comments
Post a Comment