add damage and health component
This commit is contained in:
7
scripts/components/damage.gd
Normal file
7
scripts/components/damage.gd
Normal file
@@ -0,0 +1,7 @@
|
||||
class_name DamageComponent
|
||||
extends Node2D
|
||||
|
||||
@export var damage: float = 0.25
|
||||
|
||||
func deal_damage(target: HealthComponent):
|
||||
target.decrease_health(damage)
|
Reference in New Issue
Block a user