generated from krampus/template-godot4
Fixed unused tween error
This commit is contained in:
parent
7201c030e6
commit
682850738a
|
@ -60,16 +60,20 @@ func _reset_label_scale() -> void:
|
|||
|
||||
|
||||
func _set_value(new_value: Club.Type) -> void:
|
||||
var old_label := _get_club_label(value)
|
||||
var new_label := _get_club_label(new_value)
|
||||
value = new_value
|
||||
if not (old_label or new_label):
|
||||
return
|
||||
|
||||
var tween := get_tree().create_tween()
|
||||
tween.set_parallel()
|
||||
|
||||
var old_label := _get_club_label(value)
|
||||
if old_label:
|
||||
tween.tween_property(old_label, "scale", UNSELECTED_SCALE, LABEL_SCALE_TIME).set_trans(
|
||||
Tween.TRANS_SINE
|
||||
)
|
||||
|
||||
var new_label := _get_club_label(new_value)
|
||||
if new_label:
|
||||
tween.tween_property(new_label, "scale", SELECTED_SCALE, LABEL_SCALE_TIME).set_trans(
|
||||
Tween.TRANS_SINE
|
||||
|
@ -78,5 +82,3 @@ func _set_value(new_value: Club.Type) -> void:
|
|||
tween.tween_property(club_hub, "rotation_degrees", theta, HUB_ROTATION_TIME).set_trans(
|
||||
Tween.TRANS_QUAD
|
||||
)
|
||||
|
||||
value = new_value
|
||||
|
|
Loading…
Reference in New Issue