27 lines
719 B
C#
27 lines
719 B
C#
using Chickensoft.Introspection;
|
|
|
|
namespace Zennysoft.Game.Ma.Implementation;
|
|
|
|
public partial class GameLogic
|
|
{
|
|
public partial record State
|
|
{
|
|
[Meta]
|
|
public partial record AskForTeleport : Playing, IGet<Input.FloorExitReached>, IGet<Input.HideAskForTeleport>
|
|
{
|
|
public AskForTeleport()
|
|
{
|
|
this.OnAttach(() => { Get<IGameRepo>().Pause(); Output(new Output.ShowAskForTeleport()); });
|
|
this.OnDetach(() => { Output(new Output.HideAskForTeleport()); });
|
|
}
|
|
|
|
public Transition On(in Input.FloorExitReached input) => To<FloorClearedDecisionState>();
|
|
|
|
public Transition On(in Input.HideAskForTeleport input)
|
|
{
|
|
return To<Playing>();
|
|
}
|
|
}
|
|
}
|
|
}
|