-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: upgrade to logic blocks v5 syntax
- Loading branch information
Showing
62 changed files
with
360 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
namespace GameDemo; | ||
|
||
using Chickensoft.LogicBlocks; | ||
|
||
public partial class AppLogic { | ||
public interface IState : IStateLogic { | ||
} | ||
public interface IState : IStateLogic<IState>; | ||
|
||
public abstract partial record State : StateLogic, IState { | ||
} | ||
public abstract partial record State : StateLogic<IState>, IState; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
namespace GameDemo; | ||
|
||
using Chickensoft.LogicBlocks; | ||
|
||
public partial class AppLogic { | ||
public partial record State { | ||
public record LeavingMenu : State, IGet<Input.FadeOutFinished> { | ||
public LeavingMenu() { | ||
OnEnter<LeavingMenu>( | ||
previous => Context.Output(new Output.FadeToBlack()) | ||
); | ||
this.OnEnter(() => Output(new Output.FadeToBlack())); | ||
} | ||
|
||
public IState On(Input.FadeOutFinished input) => | ||
new InGame(); | ||
public IState On(in Input.FadeOutFinished input) => new InGame(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
namespace GameDemo; | ||
|
||
using Chickensoft.LogicBlocks; | ||
|
||
public partial class AppLogic { | ||
public partial record State { | ||
public record MainMenu : State, IGet<Input.StartGame> { | ||
public MainMenu() { | ||
OnEnter<MainMenu>( | ||
previous => { | ||
Context.Output(new Output.LoadGame()); | ||
this.OnEnter( | ||
() => { | ||
Output(new Output.LoadGame()); | ||
Get<IAppRepo>().OnMainMenuEntered(); | ||
Context.Output(new Output.ShowMainMenu()); | ||
Output(new Output.ShowMainMenu()); | ||
} | ||
); | ||
} | ||
|
||
public IState On(Input.StartGame input) => new LeavingMenu(); | ||
public IState On(in Input.StartGame input) => new LeavingMenu(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
namespace GameDemo; | ||
|
||
using Chickensoft.LogicBlocks; | ||
|
||
public partial class CoinLogic { | ||
public interface IState : IStateLogic { } | ||
public interface IState : IStateLogic<IState>; | ||
|
||
public abstract partial record State : StateLogic, IState; | ||
public abstract partial record State : StateLogic<IState>, IState; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.