Class AbstractIconElement

  • All Implemented Interfaces:
    be.yildizgames.common.util.Registerable, Element

    public abstract class AbstractIconElement
    extends BaseElement
    An Icon element is a simple texture on a plane. The element can be moved, rotated.
    Author:
    Grégory Van den Borre
    • Constructor Detail

      • AbstractIconElement

        protected AbstractIconElement​(String name,
                                      be.yildizgames.module.coordinate.BaseCoordinate coordinates,
                                      Material iconMaterial)
        Full constructor.
        Parameters:
        name - Icon name, must be unique.
        coordinates - Element position and size.
        iconMaterial - Material to use on this icon.
    • Method Detail

      • rotateRadian

        public abstract void rotateRadian​(float value)
        Rotate the texture.
        Parameters:
        value - angle to rotate, in radians.
      • getZ

        protected abstract int getZ()
        Retrieve the object Z value in implementation.
        Returns:
        this icon Z value.
      • removeFromRegisterer

        protected final void removeFromRegisterer()
        Remove this object from its registerer.
      • getMaterial

        public final Material getMaterial()
        Returns:
        The material applied on this icon.
      • setMaterial

        public final void setMaterial​(Material newMaterial)
        Set a new Material.
        Parameters:
        newMaterial - New material to set.
      • setMaterialImpl

        protected abstract void setMaterialImpl​(Material newMaterial)
        Set the material in implementation.
        Parameters:
        newMaterial - Material to set.
      • getParentName

        public abstract String getParentName()
        Retrieve the parent container name in implementation.
        Returns:
        The parent container name.