From 72863ffa31e27f4c6be862d80472cfb897fccaea Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 19 Nov 2024 15:24:50 +0100 Subject: next commit --- Effects/burn_effect.gd | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Effects/burn_effect.gd') diff --git a/Effects/burn_effect.gd b/Effects/burn_effect.gd index 2e8bf7d..fe62f37 100644 --- a/Effects/burn_effect.gd +++ b/Effects/burn_effect.gd @@ -6,8 +6,6 @@ extends Effect var level := 1 var power := 0.0 -var base_modulate: Color - func _ready(): power = 5.0 + (level - 1) @@ -16,9 +14,8 @@ func _ready(): set_tick(1.0) tick_finished.connect(func(): - base_modulate = unit.sprite.self_modulate unit.set_hp(unit.hp - power) - unit.sprite.self_modulate = Color(1, 0, 0) + unit.sprite.modulate += Color(1, 0, 0, 0) await get_tree().create_timer(0.1).timeout - unit.sprite.self_modulate = base_modulate + unit.sprite.modulate -= Color(1, 0, 0, 0) ) -- cgit v1.2.3