diff options
Diffstat (limited to 'Effects/burn_effect.gd')
-rw-r--r-- | Effects/burn_effect.gd | 7 |
1 files changed, 2 insertions, 5 deletions
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) ) |