You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Undertaker-Simulator/scenes/just_blend.gd

20 lines
448 B

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