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

Add Current Graphics Keys to GraphicsComponent #2044

Closed
eonarheim opened this issue Oct 1, 2021 · 2 comments · Fixed by #2072
Closed

Add Current Graphics Keys to GraphicsComponent #2044

eonarheim opened this issue Oct 1, 2021 · 2 comments · Fixed by #2072
Labels
community in-progress This issue is marked in-progress. This label will be removed if there is no activity for 30 days. Hacktoberfest Issues marked for the community Hacktoberfest event https://hacktoberfest.digitalocean.com/

Comments

@eonarheim
Copy link
Member

eonarheim commented Oct 1, 2021

Context

Currently for a given Actor's GraphicsComponent, it's difficult to know what the currently shown graphics are by name. It is useful to know the name's of the graphics shown in all layers or a specific layer

To iterate through all the graphics layers

for (const layer of graphicsComponent.layers.get()) {
  ...
}

Proposal

  1. Add a new getter to GraphicsComponent.ts called currentKeys that will return the names of the graphics shown in all layers
  2. Add a new getter to GraphicsLayer called currentKeys that will the names of the graphics shown in this layer
  3. If a graphic doesn't have a name show "anonymous" as the name
  4. Additional internal data structure may be needed to keep track of the shown graphics per layer
  5. New unit tests are required
@eonarheim eonarheim added the Hacktoberfest Issues marked for the community Hacktoberfest event https://hacktoberfest.digitalocean.com/ label Oct 1, 2021
@ignoreintuition
Copy link
Contributor

You want me to take a stab at this one?

@eonarheim
Copy link
Member Author

@ignoreintuition all yours!

@eonarheim eonarheim added the community in-progress This issue is marked in-progress. This label will be removed if there is no activity for 30 days. label Oct 25, 2021
ignoreintuition added a commit to ignoreintuition/Excalibur that referenced this issue Oct 30, 2021
ignoreintuition added a commit to ignoreintuition/Excalibur that referenced this issue Oct 30, 2021
eonarheim pushed a commit that referenced this issue Nov 2, 2021
Closes #2044

## Changes:

- Add Current Graphics Keys to GraphicsComponent #2044
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community in-progress This issue is marked in-progress. This label will be removed if there is no activity for 30 days. Hacktoberfest Issues marked for the community Hacktoberfest event https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants