You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
There was some talk about also renaming game to something more in the lines of gameRef, iirc @filiph had a good argument for that, but I don't remember what it was. 😅
I don't remember that conversation but I think I can reconstruct my rationale. There's a much larger chance that game will conflict with (shadow or be shadowed) an existing field or local variable than if you choose gameRef.
FlameGame can be "just" the renderer/engine while the "game" (as in, chess game, for example) can be a separate object.
I honestly do like gameRef more because for me it clarifies "ownership"; the flame game owns the components, the components just have a "reference" to the parents/game. I know these are just pointers and there is no such concern wrt memory management in Dart, but helps with my own mental model.
The shadowing argument is a good one too, I can definitely see that happening. Since we are now willing to break change, should we consider bringing it back to HasGameRef / gameRef? I know @spydon you don't like abbreviations but I think ref is pretty clear, widely used, and gameReference would be a mouthful. Could also explore other names.
wdyt?
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
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.
Description
Kill deprecated
HasGameRef- it has becomeHasGameReferencesince @spydon has abbreviation phobia.Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?