Skip to content
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

Cogito_Switch style changes and Player Hud Style Changes #162

Merged
merged 3 commits into from
Apr 14, 2024

Conversation

ac-arcana
Copy link
Collaborator

@ac-arcana ac-arcana commented Apr 14, 2024

Cogito_Switch:
Added class name
Reordered variables
Added variable code region
Double spaced functions

I needed a class name so that I could find all switches in a scene in order to synchronize their state across multiplayer clients.

Added class name
Reordered variables
Added variable code region
Double spaced functions
Added class name
Reordered variables
Added variable region
Moved setup of player and attributes to its own function - this is so that if the player object is changed the HUD can be reset to the new player.
Removed any children from the ui_attribute_area to clear any UI from any previous player.
@ac-arcana ac-arcana changed the title Cogito_Switch style changes Cogito_Switch style changes and Player Hud Style Changes Apr 14, 2024
@ac-arcana
Copy link
Collaborator Author

For player HUD:
Added class name
Reordered variables
Added variable region
Moved setup of player and attributes to its own function - this is so that if the player object is changed the HUD can be reset to the new player.
Removed any children from the ui_attribute_area to clear any UI from any previous player.

The reason I moved player and inventory setup to its own function is because I am replacing the player in multiplayer. However, this may also be use for games with respawn mechanics, or squads where you can switch members.

Added argument for player in setup_player, to streamline changing to a new player. Also calling delete_interaction_prompts to prevent stuck prompts when changing players.
@ac-arcana
Copy link
Collaborator Author

ac-arcana commented Apr 14, 2024

Just improved player_hud a little more, by creating a helper function so that you can pass a player into the function directly.
Also calling delete_interaction_prompts to pervent stuck prompts from any old players.

I think I'm done making continued changes.
Sorry, I realize this is poor practice for a commit as I have done style changes AND made some changes to the hud code. It seems further commits just get rolled into my previous pull request...

Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Approved.

@Phazorknight Phazorknight merged commit df9dd9c into Phazorknight:main Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants