Make it possible to dynamically set weapon parans
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
extends Area3D
|
||||
|
||||
@export var damage: int = 20
|
||||
@export var damage_multiplexer: float = 2.0
|
||||
|
||||
signal body_part_hit(dam)
|
||||
signal body_part_hit(damage: int)
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
||||
func _ready() -> void:
|
||||
@ -12,5 +12,6 @@ func _ready() -> void:
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func hit():
|
||||
emit_signal("body_part_hit", damage)
|
||||
func hit(base_damage: int):
|
||||
var final_damage = round(base_damage * damage_multiplexer)
|
||||
emit_signal("body_part_hit", final_damage)
|
||||
|
Reference in New Issue
Block a user