summaryrefslogtreecommitdiff
path: root/Effects/burn_effect.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-11-19 15:24:50 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-11-19 15:24:50 +0100
commit72863ffa31e27f4c6be862d80472cfb897fccaea (patch)
treece04be8d77b10c797c8ff854c8ff1a219eb1af46 /Effects/burn_effect.gd
parent63d2a59042fb9d90a586ad85d8364de7c38aea8e (diff)
next commitHEADmain
Diffstat (limited to 'Effects/burn_effect.gd')
-rw-r--r--Effects/burn_effect.gd7
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)
)