parent
7f1265b41f
commit
c3f59f290c
1 changed files with 38 additions and 45 deletions
|
@ -561,17 +561,7 @@ void Tween::_tween_process(float p_delta) {
|
|||
data.finish = true;
|
||||
}
|
||||
|
||||
switch (data.type) {
|
||||
case INTER_PROPERTY:
|
||||
case INTER_METHOD: {
|
||||
Variant result = _run_equation(data);
|
||||
emit_signal("tween_step", object, NodePath(Vector<StringName>(), data.key, false), data.elapsed, result);
|
||||
_apply_tween_value(data, result);
|
||||
if (data.finish)
|
||||
_apply_tween_value(data, data.final_val);
|
||||
} break;
|
||||
|
||||
case INTER_CALLBACK:
|
||||
if (data.type == INTER_CALLBACK) {
|
||||
if (data.finish) {
|
||||
if (data.call_deferred) {
|
||||
|
||||
|
@ -607,11 +597,14 @@ void Tween::_tween_process(float p_delta) {
|
|||
object->call(data.key[0], (const Variant **)arg, data.args, error);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default: {}
|
||||
} else {
|
||||
Variant result = _run_equation(data);
|
||||
emit_signal("tween_step", object, NodePath(Vector<StringName>(), data.key, false), data.elapsed, result);
|
||||
_apply_tween_value(data, result);
|
||||
}
|
||||
|
||||
if (data.finish) {
|
||||
_apply_tween_value(data, data.final_val);
|
||||
emit_signal("tween_completed", object, NodePath(Vector<StringName>(), data.key, false));
|
||||
// not repeat mode, remove completed action
|
||||
if (!repeat)
|
||||
|
|
Loading…
Reference in a new issue