For now, go straight to instantiating the scene instead of the main menu/loading screen
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
using Chickensoft.GodotNodeInterfaces;
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace GameJamDungeon
|
namespace GameJamDungeon
|
||||||
{
|
{
|
||||||
@@ -55,6 +54,7 @@ namespace GameJamDungeon
|
|||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
||||||
{
|
{
|
||||||
|
Menu.Hide();
|
||||||
Instantiator.SceneTree.Paused = true;
|
Instantiator.SceneTree.Paused = true;
|
||||||
Game = Instantiator.LoadAndInstantiate<Game>(GAME_SCENE_PATH);
|
Game = Instantiator.LoadAndInstantiate<Game>(GAME_SCENE_PATH);
|
||||||
GameWindow.AddChildEx(Game);
|
GameWindow.AddChildEx(Game);
|
||||||
|
|||||||
@@ -9,6 +9,6 @@ namespace GameJamDungeon
|
|||||||
[LogicBlock(typeof(State), Diagram = true)]
|
[LogicBlock(typeof(State), Diagram = true)]
|
||||||
public partial class AppLogic : LogicBlock<AppLogic.State>, IAppLogic
|
public partial class AppLogic : LogicBlock<AppLogic.State>, IAppLogic
|
||||||
{
|
{
|
||||||
public override Transition GetInitialState() => To<State.MainMenu>();
|
public override Transition GetInitialState() => To<State.SetupGameScene>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
30
src/app/state/states/AppLogic.State.SetupGameScene.cs
Normal file
30
src/app/state/states/AppLogic.State.SetupGameScene.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Chickensoft.LogicBlocks;
|
||||||
|
|
||||||
|
namespace GameJamDungeon
|
||||||
|
{
|
||||||
|
public partial class AppLogic
|
||||||
|
{
|
||||||
|
public partial record State
|
||||||
|
{
|
||||||
|
[Meta]
|
||||||
|
public partial record SetupGameScene : State, IGet<Input.LoadGameFinished>
|
||||||
|
{
|
||||||
|
public SetupGameScene()
|
||||||
|
{
|
||||||
|
this.OnEnter(() =>
|
||||||
|
{
|
||||||
|
Output(new Output.SetupGameScene());
|
||||||
|
Output(new Output.ShowGame());
|
||||||
|
Input(new Input.LoadGameFinished());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.LoadGameFinished input)
|
||||||
|
{
|
||||||
|
return To<InGame>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -60,7 +60,7 @@ public class GameRepo : IGameRepo
|
|||||||
{
|
{
|
||||||
_inventoryItems = new AutoProp<List<InventoryItemInfo>>([]);
|
_inventoryItems = new AutoProp<List<InventoryItemInfo>>([]);
|
||||||
_isInventoryScreenOpened = new AutoProp<bool>(false);
|
_isInventoryScreenOpened = new AutoProp<bool>(false);
|
||||||
_isPaused = new AutoProp<bool>(true);
|
_isPaused = new AutoProp<bool>(false);
|
||||||
_playerGlobalPosition = new AutoProp<Vector3>(Vector3.Zero);
|
_playerGlobalPosition = new AutoProp<Vector3>(Vector3.Zero);
|
||||||
_equippedWeapon = new Weapon();
|
_equippedWeapon = new Weapon();
|
||||||
HPBarValue = new AutoProp<int>(0);
|
HPBarValue = new AutoProp<int>(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user