game: add weapon active ability

This commit is contained in:
2025-08-21 05:52:40 +02:00
parent 8f02850a73
commit a0d121fadc
7 changed files with 49 additions and 11 deletions

View File

@@ -4,7 +4,7 @@ extends Node2D
@export var speed: float = 500.0
@export var range: float = 200.0
@export var target: Node2D
@export var damage: float
@export var damage_mult: float = 1.0
@export var on_hit_sig: Signal
var _direction: Vector2
@@ -36,5 +36,5 @@ func _physics_process(delta: float) -> void:
func _on_area_2d_body_entered(body: Node2D) -> void:
if body in _already_hit:
return
on_hit_sig.emit(self, body)
on_hit_sig.emit(self, body, damage_mult)
_already_hit.append(body)