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

Make IteratingSystem's entities member field accessible from subclass #71

Closed
monkeyhybrid opened this issue Sep 29, 2014 · 1 comment
Closed

Comments

@monkeyhybrid
Copy link

It would be useful to have access to the private member field, entities, from within subclasses of IteratingSystem.

Currently, in some of my classes that extend IteratingSystem, I override update() to carry out some initialisation before processEntity() gets called for each entity. I'd like to skip the initialisation altogether for each engine update that has no relevant entities to process. However, with the entities member field being private, I can't simply check with entities.size().

Could entities be made protected, to allow a subclass to access it directly? Or if not, maybe a protected getter?

@monkeyhybrid
Copy link
Author

Just what I was hoping for, cheers!

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

No branches or pull requests

2 participants