using Chickensoft.Introspection; using Chickensoft.LogicBlocks; namespace Zennysoft.Game.Ma.Implementation; public partial class GameLogic { [Meta] public abstract partial record State : StateLogic { protected State() { OnAttach(() => { var gameRepo = Get(); gameRepo.IsPaused.Sync += OnIsPaused; }); OnDetach(() => { var gameRepo = Get(); gameRepo.IsPaused.Sync -= OnIsPaused; }); } public void OnIsPaused(bool isPaused) => Output(new Output.SetPauseMode(isPaused)); } }