mini_arcade_core.engine.entities ================================ .. py:module:: mini_arcade_core.engine.entities .. autoapi-nested-parse:: Engine entities for mini-arcade-core. Classes ------- .. autoapisummary:: mini_arcade_core.engine.entities.EntityIdAllocator mini_arcade_core.engine.entities.BaseEntity Module Contents --------------- .. py:class:: EntityIdAllocator(start: int = 1000) Simple entity ID allocator. :param start: The starting ID for allocation. :type start: int .. py:method:: new() -> int Allocate a new unique entity ID. :return: The allocated entity ID. :rtype: int .. py:class:: BaseEntity Base entity class. :ivar id: The unique ID of the entity. :ivar name: The optional name of the entity. :ivar transform: The transform of the entity. :ivar shape: The shape of the entity. :ivar style: The render style of the entity. :ivar kinematic: The kinematic body of the entity. :ivar collider: The collider specification of the entity. :ivar sprite: The sprite component of the entity. :ivar anim: The animation component of the entity. :ivar life: The life component of the entity. .. py:attribute:: id :type: int .. py:attribute:: name :type: str .. py:attribute:: codename :type: str .. py:attribute:: transform :type: mini_arcade_core.spaces.geometry.transform.Transform2D .. py:attribute:: shape :type: mini_arcade_core.spaces.geometry.shapes.Shape2D .. py:attribute:: z_index :type: int :value: 0 .. py:attribute:: rotation_deg :type: float :value: 0.0 .. py:attribute:: style :type: mini_arcade_core.engine.render.style.RenderStyle | None :value: None .. py:attribute:: kinematic :type: mini_arcade_core.spaces.physics.kinematics2d.Kinematic2D | None :value: None .. py:attribute:: collider :type: mini_arcade_core.spaces.collision.specs.ColliderSpec | None :value: None .. py:attribute:: sprite :type: mini_arcade_core.engine.components.Sprite2D | None :value: None .. py:attribute:: anim :type: mini_arcade_core.engine.components.Anim2D | None :value: None .. py:attribute:: life :type: mini_arcade_core.engine.components.Life | None :value: None .. py:method:: from_dict(data: dict) -> BaseEntity :classmethod: Create an entity from a dictionary. :param data: The dictionary containing the entity data. :type data: dict :return: The created entity. :rtype: BaseEntity