Skip to content
Daan van Yperen edited this page Jul 29, 2014 · 1 revision

You may sometimes want to specify to which player an entity belongs to. To do this, add the Player manager to your world.

World world = new World();
world.setManager(new PlayerManager());

Add the player entities to the Player manager upon creation:

world.getManager(PlayerManager.class).setPlayer(Entity e, String player)

You can now query the system when needed.

  • world.getManager(PlayerManager.class).getEntitiesOfPlayer(String player)
Clone this wiki locally