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);
tween.Start();

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?

asked Apr 8 in Engine by egoal (12 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.