Bandidos
Public Member Functions | List of all members
com.mygdx.game.level.GridTile Class Reference

Public Member Functions

 GridTile (int xPos, int yPos, Grid grid)
 
void addOccupyingTag (String tag)
 
void removeOccupyingTag (String tag)
 
boolean hasOccupyingTag (String tag)
 
int getPositionX ()
 
int getPositionY ()
 
float getTileWidth ()
 
float getTileHeight ()
 
float getWorldPositionX ()
 
float getWorldPositionY ()
 
void clean ()
 

Detailed Description

This class represents a tile on the Grid class.

Author
Ramses Di Perna

Constructor & Destructor Documentation

◆ GridTile()

com.mygdx.game.level.GridTile.GridTile ( int  xPos,
int  yPos,
Grid  grid 
)

The tile of the grid requires a grid position and the grid itself

Parameters
xPosas x axis index in the grid.
yPosas y axis index in the grid
gridwhich built the GridTile.

Member Function Documentation

◆ addOccupyingTag()

void com.mygdx.game.level.GridTile.addOccupyingTag ( String  tag)

◆ clean()

void com.mygdx.game.level.GridTile.clean ( )

To clean the class's references. After this method, all references of this class should be nulled and the class should not be used. This method makes the class unusable for future use.

◆ getPositionX()

int com.mygdx.game.level.GridTile.getPositionX ( )

Returns the x index position on the grid

Returns
The x index position of this tile on the grid

◆ getPositionY()

int com.mygdx.game.level.GridTile.getPositionY ( )

Returns the y index position on the grid

Returns
The y index position of this tile on the grid

◆ getTileHeight()

float com.mygdx.game.level.GridTile.getTileHeight ( )

Returns the tile height size in pixels (World space size)

Returns
The height of this tile in pixels

◆ getTileWidth()

float com.mygdx.game.level.GridTile.getTileWidth ( )

Returns the tile width size in pixels (World space size)

Returns
The width of this tile in pixels

◆ getWorldPositionX()

float com.mygdx.game.level.GridTile.getWorldPositionX ( )

Returns the x position in world space of this tile (Position in the left down corner of the tile)

Returns
The x position in world space.

◆ getWorldPositionY()

float com.mygdx.game.level.GridTile.getWorldPositionY ( )

Returns the y position in world space of this tile (Position in the left down corner of the tile)

Returns
The y position in world space.

◆ hasOccupyingTag()

boolean com.mygdx.game.level.GridTile.hasOccupyingTag ( String  tag)

◆ removeOccupyingTag()

void com.mygdx.game.level.GridTile.removeOccupyingTag ( String  tag)

The documentation for this class was generated from the following file: