Class EntityDrawable



  • public class EntityDrawable
    extends com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
    Draw an entity in projection space.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void draw​(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float width, float height)  
      void draw​(com.badlogic.gdx.graphics.g2d.Batch batch, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation)  
      float getBottomHeight​()  
      float getLeftWidth​()  
      float getMinHeight​()  
      float getMinWidth​()  
      float getRightWidth​()  
      float getTopHeight​()  
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable

        getName, setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setName, setRightWidth, setTopHeight, toString
      • Methods inherited from interface com.badlogic.gdx.scenes.scene2d.utils.Drawable

        setBottomHeight, setLeftWidth, setMinHeight, setMinWidth, setRightWidth, setTopHeight
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from class com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable

        getRegion, setRegion, tint
    • Constructor Detail

      • EntityDrawable

        public EntityDrawable​(java.lang.Class<? extends AbstractEntity> type)
                       throws java.lang.InstantiationException,
                              java.lang.IllegalAccessException,
                              java.lang.NoSuchMethodException,
                              java.lang.IllegalArgumentException,
                              java.lang.reflect.InvocationTargetException
        Parameters:
        type -
        Throws:
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.NoSuchMethodException
        java.lang.reflect.InvocationTargetException
        java.lang.IllegalArgumentException
    • Method Detail

      • draw

        public void draw​(com.badlogic.gdx.graphics.g2d.Batch batch,
                         float x,
                         float y,
                         float width,
                         float height)
        Overrides:
        draw in class com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
      • draw

        public void draw​(com.badlogic.gdx.graphics.g2d.Batch batch,
                         float x,
                         float y,
                         float originX,
                         float originY,
                         float width,
                         float height,
                         float scaleX,
                         float scaleY,
                         float rotation)
        Overrides:
        draw in class com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
        Parameters:
        batch -
        x -
        y -
        originX -
        originY -
        width -
        height -
        scaleX -
        scaleY -
        rotation -
      • getLeftWidth

        public float getLeftWidth​()
        Overrides:
        getLeftWidth in class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
        Returns:
      • getRightWidth

        public float getRightWidth​()
        Overrides:
        getRightWidth in class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
        Returns:
      • getTopHeight

        public float getTopHeight​()
        Overrides:
        getTopHeight in class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
        Returns:
      • getBottomHeight

        public float getBottomHeight​()
        Overrides:
        getBottomHeight in class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
        Returns:
      • getMinHeight

        public float getMinHeight​()
        Overrides:
        getMinHeight in class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
        Returns:
      • getMinWidth

        public float getMinWidth​()
        Overrides:
        getMinWidth in class com.badlogic.gdx.scenes.scene2d.utils.BaseDrawable
        Returns: