Class Player

java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
group24.escaperoom.entities.player.Player
All Implemented Interfaces:
Drawable

public class Player extends com.badlogic.gdx.scenes.scene2d.Actor implements Drawable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Player(int x, int y, GameScreen game)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    act(float delta)
     
    void
     
    void
     
    void
    draw(com.badlogic.gdx.graphics.g2d.Batch batch)
    Draw this Drawable on the Batch
    void
    draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
     
    void
     
    com.badlogic.gdx.math.Vector2
     
     
    com.badlogic.gdx.utils.Array<Item>
     
     
     
    com.badlogic.gdx.utils.Array<Item>
     
     
    com.badlogic.gdx.math.Rectangle
     
    com.badlogic.gdx.math.Vector2
     
    int
     
    int
     
    boolean
     
    void
     
    com.badlogic.gdx.math.Vector2
     
    void
     
    void
     
    void
     
    int
     
    void
     
    void
    setInventoryOpen(boolean isOpen)
     
    void
    setPosition(float x, float y)
     
    void
    setSize(int width, int height)
     
    void
    setTexture(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion texture)
     
    void
    stepAnimation(float delta)
     

    Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor

    addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, hit, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • Player

      public Player(int x, int y, GameScreen game)
  • Method Details

    • getGameScreen

      public GameScreen getGameScreen()
    • getDirection

      public Player.Direction getDirection()
    • setDetails

      public void setDetails(PlayerDetails details)
    • setSize

      public void setSize(int width, int height)
    • setTexture

      public void setTexture(com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion texture)
    • act

      public void act(float delta)
      Overrides:
      act in class com.badlogic.gdx.scenes.scene2d.Actor
    • setPosition

      public void setPosition(float x, float y)
      Overrides:
      setPosition in class com.badlogic.gdx.scenes.scene2d.Actor
    • calculateStatistics

      public void calculateStatistics(GameStatistics stats)
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha)
      Overrides:
      draw in class com.badlogic.gdx.scenes.scene2d.Actor
    • getRenderPriority

      public int getRenderPriority()
    • getPosition

      public com.badlogic.gdx.math.Vector2 getPosition()
    • getCenter

      public com.badlogic.gdx.math.Vector2 getCenter()
    • findInteractables

      public void findInteractables()
    • getFocusCanidates

      public com.badlogic.gdx.utils.Array<Item> getFocusCanidates()
    • getFocusedItem

      public Optional<Item> getFocusedItem()
    • openInventory

      public void openInventory()
    • getInventory

      public com.badlogic.gdx.utils.Array<Item> getInventory()
    • getInventoryIDs

      public HashSet<Integer> getInventoryIDs()
    • removeItemFromInventory

      public void removeItemFromInventory(Item i)
    • addItemToInventory

      public void addItemToInventory(Item i)
    • isInventoryOpen

      public boolean isInventoryOpen()
    • setInventoryOpen

      public void setInventoryOpen(boolean isOpen)
    • printInventory

      public void printInventory()
    • registerBinds

      public void registerBinds()
    • stepAnimation

      public void stepAnimation(float delta)
    • getOccupiedRegion

      public com.badlogic.gdx.math.Rectangle getOccupiedRegion()
    • renderPriority

      public int renderPriority()
      Specified by:
      renderPriority in interface Drawable
      Returns:
      the renderPriority of this Drawable
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.Batch batch)
      Description copied from interface: Drawable
      Draw this Drawable on the Batch
      Specified by:
      draw in interface Drawable
      Parameters:
      batch - to draw on
    • position

      public com.badlogic.gdx.math.Vector2 position()
      Specified by:
      position in interface Drawable
      Returns:
      coordinates of the lower left corner of this Drawable
    • getTileDepth

      public int getTileDepth()
      Specified by:
      getTileDepth in interface Drawable
      Returns:
      the tile depth of this Drawable