Entity Manager
Accessing An EntityManager
world.entityManagerUsing An EntityManager
// Returns an array of all spawned entities
// for the world
world.entityManager.getAllEntities();
// Returns an array of all spawned player
// entities for the world
world.entityManager.getAllPlayerEntities();
// Get an array of player entities currently assigned to
// the provided player. Players can have more than 1
// player entity, such as games where a player's input may
// control multiple entities at once.
world.entityManager.getPlayerEntitiesByPlayer(player)
// Get an array of entities by exact tag match
world.entityManager.getEntitiesByTag('zombie');
// Get an array of entities by tag substring match
// 'o' for example would match tags like zombie, ostritch, igloo
world.entityManager.getEntitiesByTagSubstring('o');Diving Deeper
Last updated
