-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
core featureRequired for the project to functionRequired for the project to functionenhancementNew feature or requestNew feature or request
Description
There needs to be a way for Module to access their actors position. Consider some different approaches, and implement the best suited one.
Some options:
- Public method in
Actorthat gets the position from theWorldit's contained in. - Making the
_worldfield public.
Considering that I would like to change World into not having positions stored, and instead have a subclass for positioning, the following are the drawbacks of each approach:
- Public method in
Actorthat gets the position from theWorldit's contained in: Having tight coupling wouldn't work, as not everyActorwould be in a world with positions for its actors. - Making the
_worldfield public: I believe this would only cause issues within aModuleif the referenced world doesn't cast to a world subclass with positioning.
Both of these approaches could be fixed by making a subclass of Actor, and implementing one of the suggested approaches. Might be an idea to also create a subclass of Module in this case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
core featureRequired for the project to functionRequired for the project to functionenhancementNew feature or requestNew feature or request