Add plastique item
Add Door object Initial work for look up animation
This commit is contained in:
@@ -4,6 +4,8 @@ public partial class AppLogic
|
||||
{
|
||||
public static class Output
|
||||
{
|
||||
public readonly record struct Initialize;
|
||||
|
||||
public readonly record struct FadeToBlack;
|
||||
|
||||
public readonly record struct ShowSplashScreen;
|
||||
|
||||
@@ -9,5 +9,5 @@ public interface IAppLogic : ILogicBlock<AppLogic.State>;
|
||||
[LogicBlock(typeof(State), Diagram = true)]
|
||||
public partial class AppLogic : LogicBlock<AppLogic.State>, IAppLogic
|
||||
{
|
||||
public override Transition GetInitialState() => To<State.MainMenu>();
|
||||
public override Transition GetInitialState() => To<State.Initialize>();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.LogicBlocks;
|
||||
|
||||
public partial class AppLogic
|
||||
{
|
||||
public partial record State
|
||||
{
|
||||
[Meta]
|
||||
public partial record Initialize : State, IGet<Input.SaveFileLoaded>
|
||||
{
|
||||
public Initialize()
|
||||
{
|
||||
this.OnEnter(() => Output(new Output.Initialize()));
|
||||
}
|
||||
|
||||
public Transition On(in Input.SaveFileLoaded input) => To<SplashScreen>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ public partial class AppLogic
|
||||
this.OnEnter(() => Output(new Output.StartLoadingSaveFile()));
|
||||
}
|
||||
|
||||
public Transition On(in Input.SaveFileLoaded input) => To<GameStarted>();
|
||||
public Transition On(in Input.SaveFileLoaded input) => To<MainMenu>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ public partial class AppLogic
|
||||
{
|
||||
public MainMenu()
|
||||
{
|
||||
OnAttach(() => Output(new Output.ShowMainMenu()));
|
||||
}
|
||||
|
||||
public Transition On(in Input.NewGame input) => To<GameStarted>();
|
||||
|
||||
@@ -16,15 +16,17 @@ public partial class AppLogic
|
||||
this.OnEnter(() => Output(new Output.ShowSplashScreen()));
|
||||
|
||||
OnAttach(
|
||||
() => Get<IAppRepo>().SplashScreenSkipped += OnSplashScreenSkipped
|
||||
);
|
||||
() =>
|
||||
{
|
||||
Get<IAppRepo>().SplashScreenSkipped += OnSplashScreenSkipped;
|
||||
});
|
||||
|
||||
OnDetach(
|
||||
() => Get<IAppRepo>().SplashScreenSkipped -= OnSplashScreenSkipped
|
||||
);
|
||||
}
|
||||
|
||||
public Transition On(in Input.FadeOutFinished input) => To<GameStarted>();
|
||||
public Transition On(in Input.FadeOutFinished input) => To<MainMenu>();
|
||||
|
||||
public void OnSplashScreenSkipped() =>
|
||||
Output(new Output.HideSplashScreen());
|
||||
|
||||
@@ -28,6 +28,8 @@ public partial class GameState
|
||||
|
||||
public readonly record struct CloseTeleport;
|
||||
|
||||
public readonly record struct CloseInventory;
|
||||
|
||||
public readonly record struct GameOver;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,13 +8,19 @@ public partial class GameState
|
||||
public partial record State
|
||||
{
|
||||
[Meta, LogicBlock(typeof(State), Diagram = true)]
|
||||
public partial record InventoryScreen : State, IGet<Input.InteractButtonPressed>
|
||||
public partial record InventoryScreen : State, IGet<Input.InteractButtonPressed>, IGet<Input.CloseInventory>
|
||||
{
|
||||
public Transition On(in Input.InteractButtonPressed input)
|
||||
{
|
||||
Output(new Output.CloseInventoryMenu());
|
||||
return To<InGame>();
|
||||
}
|
||||
|
||||
public Transition On(in Input.CloseInventory input)
|
||||
{
|
||||
Output(new Output.CloseInventoryMenu());
|
||||
return To<InGame>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,16 @@ public interface IPlayer : IKillable, ICharacterBody3D
|
||||
|
||||
public void LevelUp();
|
||||
|
||||
public void LookUp();
|
||||
|
||||
public void TeleportPlayer(Transform3D newTransform);
|
||||
|
||||
public void Equip(EquipableItem equipable);
|
||||
|
||||
public void Unequip(EquipableItem equipable);
|
||||
|
||||
public void Reset();
|
||||
|
||||
public IInventory Inventory { get; }
|
||||
|
||||
public IHealthComponent HealthComponent { get; }
|
||||
@@ -44,4 +48,6 @@ public interface IPlayer : IKillable, ICharacterBody3D
|
||||
|
||||
public event Action PlayerDied;
|
||||
public delegate InventoryItem RerollItem(InventoryItem item);
|
||||
|
||||
public event Action PointUpFinished;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user