Class Info
java.lang.Object
nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
nz.ac.vuw.ecs.swen225.gp6.domain.Tiles.Info
- All Implemented Interfaces:
Tile
This class represents a info tile which when only hero can move on, and will display hints for
the current level. Each level currently at most can have one of these tiles.
-
Field Summary
Fields inherited from class nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
info -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmessage()gets the hint message to be displayed when hero moves on this tile.booleanChecks wether this tile is an obstruction for enemy tile ,in a given domain.when an actor is moved onto this tile, then is to move off of it, replace it with the tile that this method returns.type()Each tile object will hold a reference to one TileState enum, which determines the behaviour of a number of the tiles important methods.Methods inherited from class nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.AbstractTile
info, symbolMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface nz.ac.vuw.ecs.swen225.gp6.domain.TileAnatomy.Tile
damagesHero, obstructsHero, ping, setOn
-
Constructor Details
-
Info
Create a info tile.- Parameters:
info- tile information
-
-
Method Details
-
type
Description copied from interface:TileEach tile object will hold a reference to one TileState enum, which determines the behaviour of a number of the tiles important methods.- Returns:
- the enum type of this tile, if custom tile then TileType.Other is returned.
-
message
gets the hint message to be displayed when hero moves on this tile.- Returns:
- hint message
-
obstructsEnemy
Description copied from interface:TileChecks wether this tile is an obstruction for enemy tile ,in a given domain. NOTE: does not alter the domain or this tile in anyway.- Parameters:
d- game domain to check on- Returns:
- true if obstructs enemy, if not implemented, defaults to false.
-
replaceWith
Description copied from interface:Tilewhen an actor is moved onto this tile, then is to move off of it, replace it with the tile that this method returns.- Returns:
- tile that is to replace this tile after an actor going over it. If not implemented, defaults to Floor.
-