This Class has cdefed functions that cannot be read by Sphinx. Read the source if you want to find out more about using them.
Entity is a python object that will allow access to all of the components attached to that particular entity. GameWorld is responsible for creating and recycling entities. You should never create an Entity directly or modify an entity_id. You can access an active entity component by dot lookup: for instance entity.position would retrieve the component for GameSystem with system_id ‘position’. If no component is active for that GameSystem an IndexError will be raised.
entity_id (int): The entity_id will be assigned on creation by the GameWorld. You will use this number to refer to the entity throughout your Game.
load_order (list): The load order is the order in which GameSystem components should be initialized. When GameWorld.remove_entity is called components will be removed in the reverse of load_order.
system_manager (SystemManager): The SystemManager for the GameWorld. Typically set during GameWorld.init_entity. Not accessible from Python, used internally for retrieving the appropriate index of a GameSystem.
get_component_index(self, str name) → unsigned int¶
Gets the index of the component for GameSystem with system_id name. Args:name (str): The system_id of the GameSystem to retrieve the component for.
- component_index (unsigned int): The index of the component for the GameSystem with system_id name.