GameState Reflection Rewrite#2008
Merged
diogotr7 merged 12 commits intoantonpup:devfrom May 17, 2020
Wibble199:fix/gamestate-reflection-rewrite
Merged
GameState Reflection Rewrite#2008diogotr7 merged 12 commits intoantonpup:devfrom Wibble199:fix/gamestate-reflection-rewrite
diogotr7 merged 12 commits intoantonpup:devfrom
Wibble199:fix/gamestate-reflection-rewrite
Conversation
Added FastMember as a replacement.
… 'AnythingChanged' event.
Removed the IGameState constructor from game states.
…es of certain types (GameStates, Nodes and IEnumerable<Node>s).
diogotr7
approved these changes
May 17, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IStringPropertyandStringProperty{T}have been removed. FastMember has been added instead which can achieve the same results without requiring classes to implement or extend one of these classes.Utils.GameStateUtilsclass has been removed.TryGetDoubleFromState) have been moved into the IGameState interface and GameState class. This means that instead of doing something likeGameStateUtils.TryGetDoubleFromState(gameState, VariablePath), you would now usegameState.GetNumber(VariablePath).GameStateParameterNodeclass which uses FastMember and generates a tree-like structure, making it easier for the GameStateParameterPicker to manage and opening up the possibility of adding additional metadata in future.NodeandGameState(still required forAutoJsonNode).These changes do not break profiles since the paths are still stored as strings and only the internals have been changed. Since it's such a large change though, additional testing would be appreciated.