I need to draw a custom complex animation in several parts of the game; for completely different objects (once for the player in the world, multiple times for the life display, as they share the same mentioned animation).
For that, I wanted to wrap the animation drawing code in a method in an AutoLoad class which I can then just call in the _draw methods of my player object / life display object.
However, that didn't work out. When calling the custom draw function of the AutoLoad class, using
draw_texture_rect methods inside of it fails saying I'm not in the drawing context.
How would someone create re-usable, custom drawing methods which are globally accessible?