Files
tbd-station-14/Content.Client/UserInterface/Systems/Gameplay/GameplayStateLoadController.cs
2023-03-11 14:25:56 +11:00

31 lines
631 B
C#

using Content.Client.Gameplay;
using Robust.Client.UserInterface.Controllers;
namespace Content.Client.UserInterface.Systems.Gameplay;
public sealed class GameplayStateLoadController : UIController, IOnStateChanged<GameplayState>
{
public Action? OnScreenLoad;
public Action? OnScreenUnload;
public void OnStateEntered(GameplayState state)
{
LoadScreen();
}
public void OnStateExited(GameplayState state)
{
UnloadScreen();
}
public void UnloadScreen()
{
OnScreenUnload?.Invoke();
}
public void LoadScreen()
{
OnScreenLoad?.Invoke();
}
}