From 53f2a3e8a82dd3e53a9a572e6aec98474b642e31 Mon Sep 17 00:00:00 2001 From: Ian Woods Date: Tue, 23 Jun 2026 20:00:23 -0700 Subject: [PATCH] more changes, i guess --- Assets/_Project/Scripts/Combat/TowerCombat.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/_Project/Scripts/Combat/TowerCombat.cs b/Assets/_Project/Scripts/Combat/TowerCombat.cs index cc6eb81..3498678 100644 --- a/Assets/_Project/Scripts/Combat/TowerCombat.cs +++ b/Assets/_Project/Scripts/Combat/TowerCombat.cs @@ -1,10 +1,13 @@ // Assets/_Project/Scripts/Combat/TowerCombat.cs + +using System; using System.Collections.Generic; -using Unity.Netcode; -using UnityEngine; using TD.Core; using TD.Gameplay; using TD.Towers; +using Unity.Netcode; +using UnityEngine; +using Object = UnityEngine.Object; namespace TD.Combat { @@ -75,17 +78,17 @@ namespace TD.Combat /// fired in for late-joining clients so visual /// consumers always initialise from the correct state. /// - public event System.Action OnTargetAcquired; + public event Action OnTargetAcquired; /// Fired locally on ALL peers when the tower loses its target. - public event System.Action OnTargetLost; + public event Action OnTargetLost; /// /// Fired locally on ALL peers each time the tower attacks. /// Argument is the world-space position of the primary target at the moment /// of fire — use it to aim muzzle flash, spawn a tracer, etc. /// - public event System.Action OnFire; + public event Action OnFire; // ----- NGO lifecycle ----------------------------------------------- @@ -143,7 +146,7 @@ namespace TD.Combat if (currentTarget == null) return; bool dead = currentTarget.IsDead; - bool destroyed = (currentTarget as UnityEngine.Object) == null; + bool destroyed = (currentTarget as Object) == null; bool outOfRange = Vector3.Distance( transform.position, currentTarget.transform.position) > def.Range;