enemy spawner
This commit is contained in:
44
Game/Scripts/Runtime/Data/SpawnerConfig.cs
Normal file
44
Game/Scripts/Runtime/Data/SpawnerConfig.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Game.Scripts.Runtime.Data
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Game/Spawning/Spawner Config", fileName = "SpawnerConfig")]
|
||||
public class SpawnerConfig : ScriptableObject
|
||||
{
|
||||
[Header("Radii")]
|
||||
public float MinSpawnRadius = 8f;
|
||||
public float MaxSpawnRadius = 24f;
|
||||
|
||||
[Header("Timing")]
|
||||
public float SpawnInterval = 2f;
|
||||
public AnimationCurve SpawnRateOverTime = AnimationCurve.Linear(0f, 1f, 1f, 1f);
|
||||
|
||||
[Header("Limits")]
|
||||
public int MaxConcurrent = 30;
|
||||
public int MaxPlacementAttempts = 6;
|
||||
public int PrewarmPerType = 4;
|
||||
public int PoolHardCapPerType = 60;
|
||||
|
||||
[Header("Placement")]
|
||||
public float GroundRaycastHeight = 5f;
|
||||
public float MaxHeightDelta = 4f;
|
||||
public bool UseLineOfSight = false;
|
||||
|
||||
[Header("Layers")]
|
||||
public LayerMask GroundMask = Physics.DefaultRaycastLayers;
|
||||
public LayerMask ObstacleMask = Physics.DefaultRaycastLayers;
|
||||
|
||||
[Header("NavMesh")]
|
||||
public int NavMeshAreaMask = -1;
|
||||
|
||||
[Header("RNG")]
|
||||
[SerializeField] private bool useSeed;
|
||||
[SerializeField] private int seedValue = 0;
|
||||
|
||||
[Header("Debug")]
|
||||
public bool DrawGizmos = false;
|
||||
public int GizmoSampleCount = 16;
|
||||
|
||||
public int? Seed => useSeed ? seedValue : (int?)null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user