-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/player persistence visuals #356
Conversation
Placed on hold to verify potential refactorings from MLAPI features. |
{ | ||
// TODO: Re-implement CharSelect preview (GOMPS-550) | ||
//m_InSceneCharacter.gameObject.SetActive(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering when this will be done
Had a call with Fernando - we discussed changing PlayerAvatar structure now instead of later, incorporating NetworkAnimator. This way we won't need to deal with another PR that changes structure of how player gameobjects are structured. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see prior comment
…efactoring, rereferencing
targetPosition = targetNetworkObj.transform.position; | ||
} | ||
|
||
if ((m_Parent.transform.position - targetPosition).sqrMagnitude < (padRange * padRange)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a stylistic note - I would much rather prefer this boolean value to be captured into a variable with an explicit name VS having a comment. Has to do with comments being fragile code smells almost in all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a request to change anything - more so a general observation about our codebase. We have these comments that describe what's happening in the logic, where a properly placed and named variable would do a better job in the readability and maintainability department.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree on this. Best to just be explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part 3/3 of Player Persistence. Jira here.
This PR fixes any visuals that were omitted from Part 2. This re-introduces names/health/portrait to
PartyHud
, and re-introduces the world-space displayed name for a player avatar.Notable changes:
CharSelect
scene.GameStateRelay
has been removed, as character select data can be passed toPersistentPlayer
. A late-joiner gets assigned a random avatar class.NetworkGameState
NetworkObject is spawned alongside the host. This keeps track of the win state. Server sets this component's win state, and clients read from this state value when presenting win/loss screen.PartyHud
refactor to initialize state as avatars are spawned inside BossRoom scene. This removed a fair amount of hard referencing inside ofClientCharacterVisualization
. Systems are decoupled.