0 votes

Hi, fellows.

I have been playing with Godot for a period of time, using mono version with c#.

So my question is about Tween usage, how do you structure Tween in you project?

I mean,

  • do you use one Tween for one Node, and manage each actions by property name ?

  • or do you use each Tween for each actions?

  • or do you use a single Tween as a manager? (I am not sure, but with the object parameter in Interploate* method, this may be a way)

and, how do you manage them? just create -> add-> start-> queue_free? or have a Tween pool?

Thank in advance!

Basiclly, I want to use Tween like what i used to do in other frameworks:
var tween = Player.MoveBy(Vector.Right* 100f, 1f, onCompelted);

Currently, I make a new scene with a single Tween node, warp some function(like the above MoveBy). connect on_all_completed in _Ready() to itself, where I just invoke the onCompelted callback. Then each time I need tween, instantiate one like I said.

do we have any suggestions about this?

in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.