22 lines
551 B
C#
22 lines
551 B
C#
using UnityEngine;
|
|
using UVC.Core;
|
|
|
|
namespace Sample
|
|
{
|
|
/// <summary>
|
|
/// Type B: MonoBehaviour - Scene 라이프사이클
|
|
/// 씬 전환 시 자동 파괴됨
|
|
/// </summary>
|
|
public class InjectorSampleEnemySpawner : MonoBehaviour, IEnemySpawner
|
|
{
|
|
[Inject] private ILogService _logger;
|
|
public int EnemyCount { get; private set; }
|
|
|
|
public void SpawnEnemy(Vector3 position)
|
|
{
|
|
EnemyCount++;
|
|
_logger?.Log($"Enemy spawned at {position}. Total: {EnemyCount}");
|
|
}
|
|
}
|
|
}
|