Class Entity.CppProxy

  • All Implemented Interfaces:
    Entity
    Enclosing interface:
    Entity

    public static final class Entity.CppProxy
    extends java.lang.Object
    implements Entity
    • Method Detail

      • _djinni_private_destroy

        public void _djinni_private_destroy()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: Entity
        Set a new name to the entity. Name could be empty.
        Specified by:
        setName in interface Entity
        Parameters:
        name - (string): new entity name.
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Entity
        Returns:
        entity name (string)
      • addChild

        public void addChild​(Entity child)
        Description copied from interface: Entity
        add entiy as child to hierarchy
        Specified by:
        addChild in interface Entity
        Parameters:
        child - (entity): child entity.
      • removeChild

        public void removeChild​(Entity child)
        Description copied from interface: Entity
        remove entiy as child to hierarchy
        Specified by:
        removeChild in interface Entity
        Parameters:
        child - (entity): child entity.
      • getChildren

        public java.util.ArrayList<Entity> getChildren()
        Description copied from interface: Entity
        get all child entites list.
        Specified by:
        getChildren in interface Entity
      • clearChildren

        public void clearChildren()
        Description copied from interface: Entity
        remove all child entites list.
        Specified by:
        clearChildren in interface Entity
      • findChildByName

        public Entity findChildByName​(java.lang.String entityName)
        Description copied from interface: Entity
        Perform depth-first traverse of entity tree. Return first found child with name `entityName` or NULL if such an entity doesn't exist.
        Specified by:
        findChildByName in interface Entity
        Parameters:
        entityName - (string): name of desired entity
        Returns:
        found entity (entity) or null
      • getParent

        public Entity getParent()
        Specified by:
        getParent in interface Entity
        Returns:
        parent entity and null if given entity is root.
      • setActive

        public void setActive​(boolean active)
        Description copied from interface: Entity
        Set enable/disable entity flag. The disabling of the entity is equivalent to removing the entity and all its children from the hierarchy.
        Specified by:
        setActive in interface Entity
        Parameters:
        active - (bool) activity flag.
      • isActive

        public boolean isActive()
        Specified by:
        isActive in interface Entity
        Returns:
        activity flag (bool)
      • addIntoLayer

        public void addIntoLayer​(Layer layer)
        Description copied from interface: Entity
        Add entity for given layer if it is wasn't added before.
        Specified by:
        addIntoLayer in interface Entity
        Parameters:
        layer - (layer): layer to add.
      • removeFromLayer

        public void removeFromLayer​(Layer layer)
        Description copied from interface: Entity
        Removes entity from given layer if it is was added before.
        Specified by:
        removeFromLayer in interface Entity
      • getLayers

        public java.util.ArrayList<Layer> getLayers()
        Description copied from interface: Entity
        returns list of layers in which entity was added.
        Specified by:
        getLayers in interface Entity
      • addComponent

        public void addComponent​(Component component)
        Description copied from interface: Entity
        add given component to entity if component of given type wasn't added before.
        Specified by:
        addComponent in interface Entity
        Parameters:
        component - (component): component to add.
      • hasComponent

        public boolean hasComponent​(ComponentType type)
        Description copied from interface: Entity
        check if component of given type was added.
        Specified by:
        hasComponent in interface Entity
        Returns:
        flag (bool)
      • getComponent

        public Component getComponent​(ComponentType type)
        Description copied from interface: Entity
        get component of given type.
        Specified by:
        getComponent in interface Entity
        Returns:
        component of given type (component)
      • removeComponent

        public void removeComponent​(Component component)
        Description copied from interface: Entity
        remove given component to entity if component of given component was added before.
        Specified by:
        removeComponent in interface Entity
        Parameters:
        component - (component): component to remove.