Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | al.glez | |
Old Version | Published before Godot 3 was released. |
I’m using custom drawings for almost everything in one project I’m working on. Until now I have used linear velocity etc. But now I need to create some kind of small animations that disappear after some time. For example an small animation when the player touch the screen (longer than the actual touch).
I don’t know what is the best method to do this, and I would like to know if it is a better method that the ones I can think of:
- Add child to that exact animation with a timer. I should “deactivate” the child after the times consume (or other conditional). I’m not sure how to do this exactly, but seems to be the best approach.
- Create a conditional inside a
_draw():
. I don’t like that much this approache because I maybe I need more than one animation at a time, and should check that condition every frame.
Note that _draw
is called not every frame, but only after (but not immediately after) update()
is called.
Bojidar Marinov | 2016-04-22 10:51
Yes I know, I simplified because since I’m using already a lot of custom drawing I need to use a new _draw():
function or the ones I’m already using.
al.glez | 2016-04-22 16:04