Skip to content

Investigate and add in better lifecycle support for game entities #13

@bijington

Description

@bijington

Consider letting GameScene and GameObject know when child objects are added/removed. Also allow for objects to know when they have been added/removed.

And finally GameScene should know when it is loaded/unloaded.

Something like:

public class GameScene
{
    public void OnGameObjectAdded(IGameObject gameObject);

    public void OnGameObjectRemoved(IGameObject gameObject);

    public void OnLoaded();

    public void OnUnloaded();
}
public class GameObject
{
    public void OnGameObjectAdded(IGameObject gameObject);

    public void OnGameObjectRemoved(IGameObject gameObject);

    public void OnAdded(); // TODO: Parent?

    public void OnRemoved();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions