eNEMIES!!!!!!!!!

Enemys and enemy spawner

- Press N to spawn wave
- Press H to togglt hitboxs
This commit is contained in:
Twirpytherobot
2025-11-29 20:39:30 +00:00
parent b606563f4d
commit 689181ac30
10 changed files with 699 additions and 79 deletions
+8
View File
@@ -14,6 +14,9 @@ signal hit_landed(target: Node, damage: float, knockback: float, attacker_pos: V
## Owner entity (used to prevent self-damage and identify attacker)
@export var owner_entity: Node = null
## Global debug visibility toggle (static-like via class name access)
static var debug_visible: bool = true
## Whether hitbox is currently active (only deals damage when active)
var is_active: bool = false
## Tracks entities hit this attack (prevents multi-hit)
@@ -61,10 +64,15 @@ func _create_debug_visualization(collision_shape: CollisionShape3D):
if mesh:
_debug_mesh.mesh = mesh
_debug_mesh.material_override = _debug_material
_debug_mesh.visible = HitBox.debug_visible
# Don't set transform - it inherits from parent CollisionShape3D
collision_shape.add_child(_debug_mesh)
func _physics_process(_delta):
# Update debug visibility
if _debug_mesh:
_debug_mesh.visible = HitBox.debug_visible
if not is_active:
return