Refactor stats
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.Serialization;
|
||||
using Zennysoft.Game.Ma;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
[Meta, Id("game_data")]
|
||||
public partial record GameData
|
||||
{
|
||||
[Save("player_data")]
|
||||
public required PlayerData PlayerData { get; init; }
|
||||
|
||||
[Save("map_data")]
|
||||
public required MapData MapData { get; init; }
|
||||
|
||||
[Save("rescued_items")]
|
||||
public required RescuedItemDatabase RescuedItems { get; init; }
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using Zennysoft.Game.Abstractions;
|
||||
using Zennysoft.Game.Implementation;
|
||||
|
||||
namespace Zennysoft.Ma.Adapter;
|
||||
|
||||
|
||||
@@ -19,11 +19,13 @@ public partial class GameState
|
||||
public Transition On(in Input.ContinueGame input)
|
||||
{
|
||||
Output(new Output.InitializeGame());
|
||||
Output(new Output.LoadGameFromFile());
|
||||
return To<InGame>();
|
||||
}
|
||||
|
||||
public Transition On(in Input.LoadGame input)
|
||||
{
|
||||
Output(new Output.InitializeGame());
|
||||
Output(new Output.LoadGameFromFile());
|
||||
return To<InGame>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user