eNEMIES!!!!!!!!!
Enemys and enemy spawner - Press N to spawn wave - Press H to togglt hitboxs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user