spells work! changed the layer to enemy

This commit is contained in:
Ian Woods 2026-07-14 21:37:41 -07:00
parent 7cf15dcaa6
commit ca958376a4
4 changed files with 20 additions and 6 deletions

View file

@ -31,6 +31,10 @@ namespace TD.Gameplay.BuilderSpells
int count = Physics.OverlapSphereNonAlloc(
targetPoint, Mathf.Max(Radius, 0.01f), s_overlapBuffer, enemyLayerMask);
// TEMP DEBUG — remove once cast resolution is confirmed working.
Debug.Log($"[FireballSpellDefinition] ServerCast at {targetPoint}, radius " +
$"{Mathf.Max(Radius, 0.01f):0.##}, found {count} colliders.");
bool hitAny = false;
for (int i = 0; i < count; i++)
{

View file

@ -36,6 +36,16 @@ namespace TD.Gameplay.BuilderSpells
int count = Physics.OverlapSphereNonAlloc(
targetPoint, Mathf.Max(Radius, 0.01f), s_overlapBuffer, enemyLayerMask);
// TEMP DEBUG — remove once cast resolution is confirmed working.
Debug.Log($"[SlowAreaSpellDefinition] ServerCast at {targetPoint}, radius " +
$"{Mathf.Max(Radius, 0.01f):0.##}, found {count} colliders.");
for (int i = 0; i < count; i++)
{
var c = s_overlapBuffer[i];
Debug.Log($" hit[{i}]: '{c.name}' layer={LayerMask.LayerToName(c.gameObject.layer)} " +
$"hasEnemyHealth={c.GetComponent<EnemyHealth>() != null}");
}
bool hitAny = false;
for (int i = 0; i < count; i++)
{