Class TerrainTile

java.lang.Object
com.csse3200.game.areas.terrain.TerrainTile
All Implemented Interfaces:
com.badlogic.gdx.maps.tiled.TiledMapTile

public class TerrainTile extends Object implements com.badlogic.gdx.maps.tiled.TiledMapTile
Custom terrain tile implementation for tiled map terrain that stores additional properties we may want to have in the game, such as audio, walking speed, traversability by AI, etc.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.badlogic.gdx.maps.tiled.TiledMapTile

    com.badlogic.gdx.maps.tiled.TiledMapTile.BlendMode
  • Constructor Summary

    Constructors
    Constructor
    Description
    TerrainTile(com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.badlogic.gdx.maps.tiled.TiledMapTile.BlendMode
     
    int
     
    com.badlogic.gdx.maps.MapObjects
    Not required for game, unimplemented
    float
     
    float
     
    com.badlogic.gdx.maps.MapProperties
    Not required for game, unimplemented
    com.badlogic.gdx.graphics.g2d.TextureRegion
     
    void
    setBlendMode(com.badlogic.gdx.maps.tiled.TiledMapTile.BlendMode blendMode)
     
    void
    setId(int id)
     
    void
    setOffsetX(float offsetX)
     
    void
    setOffsetY(float offsetY)
     
    void
    setTextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TerrainTile

      public TerrainTile(com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion)
  • Method Details

    • getId

      public int getId()
      Specified by:
      getId in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • setId

      public void setId(int id)
      Specified by:
      setId in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • getBlendMode

      public com.badlogic.gdx.maps.tiled.TiledMapTile.BlendMode getBlendMode()
      Specified by:
      getBlendMode in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • setBlendMode

      public void setBlendMode(com.badlogic.gdx.maps.tiled.TiledMapTile.BlendMode blendMode)
      Specified by:
      setBlendMode in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • getTextureRegion

      public com.badlogic.gdx.graphics.g2d.TextureRegion getTextureRegion()
      Specified by:
      getTextureRegion in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • setTextureRegion

      public void setTextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion textureRegion)
      Specified by:
      setTextureRegion in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • getOffsetX

      public float getOffsetX()
      Specified by:
      getOffsetX in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • setOffsetX

      public void setOffsetX(float offsetX)
      Specified by:
      setOffsetX in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • getOffsetY

      public float getOffsetY()
      Specified by:
      getOffsetY in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • setOffsetY

      public void setOffsetY(float offsetY)
      Specified by:
      setOffsetY in interface com.badlogic.gdx.maps.tiled.TiledMapTile
    • getProperties

      public com.badlogic.gdx.maps.MapProperties getProperties()
      Not required for game, unimplemented
      Specified by:
      getProperties in interface com.badlogic.gdx.maps.tiled.TiledMapTile
      Returns:
      null
    • getObjects

      public com.badlogic.gdx.maps.MapObjects getObjects()
      Not required for game, unimplemented
      Specified by:
      getObjects in interface com.badlogic.gdx.maps.tiled.TiledMapTile
      Returns:
      null