You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/D2D_Scripts/Gameplay/Spawners/SpawnTrigger.cs

27 lines
517 B
C#

2 months ago
using System;
using UnityEngine;
namespace D2D.Gameplay
{
[RequireComponent(typeof(ISpawner))]
public class SpawnTrigger : MonoBehaviour
{
private ISpawner Spawner
{
get
{
if (_spawner == null)
_spawner = GetComponent<ISpawner>();
return _spawner;
}
}
private ISpawner _spawner;
protected GameObject Trigger()
{
return Spawner.Spawn();
}
}
}