when I try to:
event.showAnimation('animation', 'attack', false);
and in the meantime:
event.hp -= 10000;
I am getting:
Uncaught TypeError: Cannot read properties of null (reading 'position')
at get position [as position] (DisplayObject.ts:819:31)
at get x [as x] (DisplayObject.ts:773:21)
at RpgComponent.getPositionsOfGraphic (Component.ts:332:21)
at Animation2.update (Animation.ts:199:33)
at SceneMap.draw (Scene.ts:131:23)
at SceneMap.draw (Map.ts:220:15)
at RpgRenderer.draw (Renderer.ts:158:52)
at Object.next (Renderer.ts:50:18)
at ConsumerObserver2.next (Subscriber.ts:161:25)
at Subscriber2._next (Subscriber.ts:119:22)
in client console
Is it possible to stop animation on the event before removing it?