extends AnimationTree var tween: Tween = null func _input(event: InputEvent) -> void: if event.is_action_pressed("blend"): if tween != null: tween.kill() tween = get_tree().create_tween() tween.set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_CUBIC) tween.tween_method(set_blend,0.,1.,0.4) if event.is_action_pressed("ui_left"): set_blend(0) func set_blend(value:float): self["parameters/Blend2/blend_amount"] = value pass