Summoner
This commit is contained in:
@@ -30,6 +30,9 @@ namespace DemonBoss.Summoner
|
||||
[Tooltip("Only spawn if player is within this distance (0 = disabled)")]
|
||||
public float maxDistanceToPlayer = 0f;
|
||||
|
||||
[Tooltip("Require summoner to be at or beyond safe distance before summoning")]
|
||||
public bool requireSafeDistance = false;
|
||||
|
||||
[Header("Debug")]
|
||||
[Tooltip("Enable debug logging")]
|
||||
public bool enableDebug = false;
|
||||
@@ -77,6 +80,12 @@ namespace DemonBoss.Summoner
|
||||
}
|
||||
}
|
||||
|
||||
if (requireSafeDistance && !summoner.IsAtSafeDistance())
|
||||
{
|
||||
if (enableDebug) Debug.Log("[DEC_CanSpawnMinions] Not at safe distance - FALSE");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check cooldown
|
||||
if (checkCooldown)
|
||||
{
|
||||
@@ -102,4 +111,4 @@ namespace DemonBoss.Summoner
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user