Skip to content

Create some way to access actor position within a module #58

@Exouxas

Description

@Exouxas

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 Actor that gets the position from the World it's contained in.
  • Making the _world field 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 Actor that gets the position from the World it's contained in: Having tight coupling wouldn't work, as not every Actor would be in a world with positions for its actors.
  • Making the _world field public: I believe this would only cause issues within a Module if 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core featureRequired for the project to functionenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions