Forest_Client/Forest/Assets/Scripts/Gameplay/Game/GameStateStart.cs

36 lines
957 B
C#
Raw Normal View History

2024-06-12 15:01:54 +08:00
using Gameplay.LoadingExecutor;
using Framework.State;
using Framework.UI;
namespace Gameplay.Game
{
public class GameStateStart : IState
{
private string _windowPos;
private bool _stayTuned;
2024-06-12 15:01:54 +08:00
public GameStateStart(string windowPos, bool stayTuned = false)
2024-06-12 15:01:54 +08:00
{
_windowPos = windowPos;
_stayTuned = stayTuned;
2024-06-12 15:01:54 +08:00
}
public void OnEnter()
{
LoadingExecutorManager.Instance.ExecuteLoading(
new GameStartLoadingExecutor(_windowPos, _stayTuned));
2024-06-12 15:01:54 +08:00
}
public void OnUpdate(float deltaTime)
{
}
public void OnExit()
{
UIManager.Instance.CloseAllUI(true);
GfxManager.Instance.ReturnGfxObj("Effect_MainCharacter", true);
GfxManager.Instance.ReturnGfxObj("Effect_SelectSequin", true);
GfxManager.Instance.ReturnGfxObj("Effect_Sequin", true);
2024-06-12 15:01:54 +08:00
}
}
}