mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-18 15:13:47 +00:00
Dialogue System
This commit is contained in:
parent
77765a581e
commit
1fa77f0c03
690 changed files with 46698 additions and 14 deletions
|
|
@ -0,0 +1,34 @@
|
|||
extends DialogicAnimation
|
||||
|
||||
func animate() -> void:
|
||||
|
||||
var modulation_property := get_modulation_property()
|
||||
var end_modulation_alpha := 1.0
|
||||
|
||||
if is_reversed:
|
||||
end_modulation_alpha = 0.0
|
||||
|
||||
else:
|
||||
var original_modulation: Color = node.get(modulation_property)
|
||||
original_modulation.a = 0.0
|
||||
node.set(modulation_property, original_modulation)
|
||||
|
||||
var tween := (node.create_tween() as Tween)
|
||||
if is_reversed:
|
||||
tween.set_ease(Tween.EASE_IN)
|
||||
else:
|
||||
tween.set_ease(Tween.EASE_OUT)
|
||||
tween.set_trans(Tween.TRANS_SINE)
|
||||
tween.tween_property(node, modulation_property + ":a", end_modulation_alpha, time)
|
||||
|
||||
await tween.finished
|
||||
finished_once.emit()
|
||||
|
||||
|
||||
func _get_named_variations() -> Dictionary:
|
||||
return {
|
||||
"fade in": {"reversed": false, "type": AnimationType.IN},
|
||||
"fade out": {"reversed": true, "type": AnimationType.OUT},
|
||||
"fade cross": {"type": AnimationType.CROSSFADE},
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue