| | 1 | | using UnityEngine; |
| | 2 | |
|
| | 3 | | internal interface ISpawnPointIndicatorInstantiator |
| | 4 | | { |
| | 5 | | ISpawnPointIndicator Instantiate(); |
| | 6 | | } |
| | 7 | |
|
| | 8 | | internal class SpawnPointIndicatorInstantiator : ISpawnPointIndicatorInstantiator |
| | 9 | | { |
| | 10 | | internal const string RESOURCE_PATH = "SpawnPointIndicator"; |
| | 11 | |
|
| | 12 | | private readonly SpawnPointIndicatorMonoBehaviour resource; |
| | 13 | |
|
| 0 | 14 | | public SpawnPointIndicatorInstantiator() |
| | 15 | | { |
| 0 | 16 | | resource = Resources.Load<SpawnPointIndicatorMonoBehaviour>(RESOURCE_PATH); |
| 0 | 17 | | } |
| | 18 | |
|
| | 19 | | ISpawnPointIndicator ISpawnPointIndicatorInstantiator.Instantiate() |
| | 20 | | { |
| 0 | 21 | | SpawnPointIndicatorMonoBehaviour go = Object.Instantiate(resource); |
| 0 | 22 | | return new SpawnPointIndicator(go); |
| | 23 | | } |
| | 24 | | } |