-
Notifications
You must be signed in to change notification settings - Fork 28
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
Where to add Player instance in order to get instance of Player everywhere in the code #34
Comments
Already posted in the Pull Request, but to reiterate, I think this is a good idea too. Sandbox.EntityListObject.addEntity(e); Kind of thing? To keep Sandbox clean, but still be able to have more verbose validation on functions like addEntity(). |
Yeah we can have something similar. This object can have methods like removeDeadEnemies( ) , addEnemyToScreen( ) , checkEnenmyCollisionWithPlayer( ) |
Sounds good, though I think "checkEnenmyCollisionWithPlayer( )" would be inside each enemy, rather than a global check, wouldn't it? |
I feel having it local to entity is better as I feel otherwise the function will be large and complicated as it will have special case for different types of enemies. |
Agreed |
So far I feel Player belongs to a scene and should be placed in classes that represent levels like Sandbox class.
Also I feel entities(player, enemies and other things) should be a part of scene only.
What are your opinions ?
The text was updated successfully, but these errors were encountered: