customer state 로직 수정

This commit is contained in:
NTG 2025-08-17 21:56:25 +09:00
parent 63f8e26cb5
commit 56b5f3a701

View File

@ -21,7 +21,6 @@ public class RestaurantCustomerStateSo : ScriptableObject, IGameFlowHandler
[Title("디버그")]
[ReadOnly, SerializeField] private SpawnSchedule _spawnSchedule;
private GameStateSo _gameStateSo;
private LevelDataSo _levelDataSo;
private CustomerDataSo _customerDataSo;
private CustomerPoolDataSo _customerPoolDataSo;
@ -52,13 +51,9 @@ public Task OnExitCurrentFlow(GameFlowState exitingFlowState)
private async Task InitializeRunRestaurant()
{
_gameStateSo = await AssetManager.LoadAsset<GameStateSo>(DataConstants.GameStateSo);
Debug.Assert(_gameStateSo != null, "_gameStateSo is null");
_iCustomerFactory = new CustomerFactory();
var currentGameLevel = _gameStateSo.GetCurrentLevel();
var currentGameLevel = GameStateSo.instance.GameLevelStateSo.Level;
if (_levelDataSo == null)
{
_levelDataSo = DataManager.Instance.GetDataSo<LevelDataSo>();
@ -80,7 +75,7 @@ private async Task InitializeRunRestaurant()
_spawnLoopCancellationTokenSource?.Cancel();
_spawnLoopCancellationTokenSource = new CancellationTokenSource();
_ = RunSpawnLoopAsync(currentLevelData, normalPool, specialPool, _spawnLoopCancellationTokenSource.Token);
await RunSpawnLoopAsync(currentLevelData, normalPool, specialPool, _spawnLoopCancellationTokenSource.Token);
}
private async Task RunSpawnLoopAsync(LevelData levelData, CustomerPoolData normalPool, CustomerPoolData specialPool, CancellationToken token)