fixed up some damage number bugs
This commit is contained in:
@@ -3,8 +3,13 @@ extends CollisionShape3D
|
||||
|
||||
@export var critical_zone: bool = false
|
||||
|
||||
signal took_damage(amount: int)
|
||||
signal took_damage(amount: int, damage_type: Data.DamageIndicationType, pos: Vector3)
|
||||
signal recieved_effect(effect: StatusEffect)
|
||||
|
||||
|
||||
func damage(amount: int) -> void:
|
||||
took_damage.emit(amount * 1.5 if critical_zone else amount)
|
||||
func damage(amount: int, damage_type: Data.DamageIndicationType = Data.DamageIndicationType.PLAYER, pos: Vector3 = global_position) -> void:
|
||||
took_damage.emit(roundi(amount * 1.5) if critical_zone else amount, damage_type, pos)
|
||||
|
||||
|
||||
func apply_effect(effect: StatusEffect) -> void:
|
||||
recieved_effect.emit(effect)
|
||||
|
||||
Reference in New Issue
Block a user