DDD-32 GameFlowManager의 기능 일부SceneManager로 이관

This commit is contained in:
NTG_Lenovo 2025-07-10 19:32:01 +09:00
parent 0a06c10e29
commit b83e4c3a5e
2 changed files with 5 additions and 11 deletions

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.ResourceManagement.ResourceProviders;
using UnityEngine.SceneManagement;
namespace DDD
@ -27,8 +28,6 @@ public void Init()
public async void PostInit()
{
SceneManager.Instance.OnSceneChanged += OnFlowSceneOpened;
try
{
if (IsGameStarted() == false)
@ -109,12 +108,6 @@ public void OpenFlowScene(GameFlowState newFlowState)
}
}
private Scene _currentScene;
public void OnFlowSceneOpened(Scene newScene)
{
_currentScene = newScene;
}
public bool GetFlowScene(GameFlowState flowState, out SceneType sceneType)
{
return GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out sceneType);

View File

@ -3,7 +3,6 @@
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.ResourceManagement.ResourceProviders;
using UnityEngine.SceneManagement;
namespace DDD
{
@ -18,7 +17,9 @@ public class SceneManager : Singleton<SceneManager>, IManager
{
private Dictionary<SceneType, SceneInstance> _loadedScenes;
public Action<Scene> OnSceneChanged;
private SceneInstance _currentSceneInstance;
public Action<SceneInstance> OnSceneChanged;
public void Init()
{
@ -87,7 +88,7 @@ public void ActivateScene(SceneType sceneType)
}
UnityEngine.SceneManagement.SceneManager.SetActiveScene(sceneInstance.Scene);
OnSceneChanged?.Invoke(sceneInstance.Scene);
_currentSceneInstance = sceneInstance;
}
else
{