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

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

Open
bijington opened this issue Jul 14, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@bijington
Copy link
Owner

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();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant