new Saloon.Tile()
Initializes a Tile with basic logic as provided by the Creer code generator.
Never use this directly. It is for internal Joueur use.
Extends
Members
-
Saloon.Bottle bottle
-
The beer Bottle currently flying over this Tile, null otherwise.
-
Saloon.Cowboy cowboy
-
The Cowboy that is on this Tile, null otherwise.
-
Saloon.Furnishing furnishing
-
The furnishing that is on this Tile, null otherwise.
-
string gameObjectName
- Inherited From:
- Saloon.GameObject#gameObjectName
-
boolean hasHazard
-
If this Tile is pathable, but has a hazard that damages Cowboys that path through it.
-
string id
- Inherited From:
- Saloon.GameObject#id
-
boolean isBalcony
-
If this Tile is a balcony of the Saloon that YoungGuns walk around on, and can never be pathed through by Cowboys.
-
Array.<string> logs
- Inherited From:
- Saloon.GameObject#logs
-
Saloon.Tile tileEast
-
The Tile to the 'East' of this one (x+1, y). Null if out of bounds of the map.
-
Saloon.Tile tileNorth
-
The Tile to the 'North' of this one (x, y-1). Null if out of bounds of the map.
-
Saloon.Tile tileSouth
-
The Tile to the 'South' of this one (x, y+1). Null if out of bounds of the map.
-
Saloon.Tile tileWest
-
The Tile to the 'West' of this one (x-1, y). Null if out of bounds of the map.
-
number x
-
The x (horizontal) position of this Tile.
-
number y
-
The y (vertical) position of this Tile.
-
Saloon.YoungGun youngGun
-
The YoungGun on this tile, null otherwise.
String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.
A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.
Any strings logged will be stored here. Intended for debugging.
Methods
-
Array.<string> directions()
-
Gets the valid directions that tiles can be in, "North", "East", "South", or "West"
Returns: Array.<string>
"East", "South", and "West" -
Array.<Tile> getNeighbors()
-
Gets the neighbors of this Tile
Returns: Array.<Tile>
The neighboring (adjacent) Tiles to this tile -
boolean hasNeighbor()
-
Checks if this Tile has a specific neighboring Tile
Returns: boolean
if the tile is a neighbor of this Tile, false otherwise -
boolean isPathable()
-
Checks if a Tile is pathable to units
Returns: boolean
True if pathable, false otherwise -
log(message)
- Inherited From:
- Saloon.GameObject#log
-
string toString()
- Inherited From:
- BaseGameObject#toString
Adds a message to this GameObject's logs. Intended for your own debugging purposes, as strings stored here are saved in the gamelog.
Name | Type | Description |
---|---|---|
message |
string | A string to add to this GameObject's log. Intended for debugging. |
toString override for easier debugging