-
Method Summary
boolean
Tests for equality between two tiles.
int
Gets the tile coordinate.
int
Computes a hash code for this tile.
boolean
boolean
boolean
boolean
Methods inherited from interface de.gurkenlabs.litiengine.environment.tilemap.ICustomPropertyProvider
getBoolValue, getBoolValue, getByteValue, getByteValue, getColorValue, getColorValue, getCommaSeparatedStringValues, getDoubleValue, getDoubleValue, getEnumValue, getEnumValue, getFileValue, getFileValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getProperties, getProperty, getShortValue, getShortValue, getStringValue, getStringValue, getTypeOfProperty, hasCustomProperty, removeProperty, setProperties, setTypeOfProperty, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue
-
Method Details
-
getGridId
int getGridId()
Gets the grid id.
- Returns:
- the grid id
-
-
getTileCoordinate
Point getTileCoordinate()
Gets the tile coordinate.
- Returns:
- the tile coordinate
-
-
isFlippedHorizontally
boolean isFlippedHorizontally()
-
isFlippedVertically
boolean isFlippedVertically()
-
isFlippedDiagonally
boolean isFlippedDiagonally()
-
isFlipped
boolean isFlipped()
-
equals
boolean equals(Object anObject)
Tests for equality between two tiles. Two tiles are equal if they have the same grid ID, flipped flags, and
tileset entry.
- Overrides:
equals in class Object
- Parameters:
anObject - The tile to test equality for
- Returns:
- Whether the provided tile is equal to this tile, or
false if anObject is not a tile
-
hashCode
int hashCode()
Computes a hash code for this tile. A tile's hash code is equal to its stored grid ID, i.e. the gid bitmask, xor the
tileset entry's hash code.
- Overrides:
hashCode in class Object
- Returns:
- The hash code for this tile