private void setMoveState(List <Tile> tiles, TileDisplayState moveState) { foreach (Tile tile in tiles) { tile.setState(moveState); } }
public void setState(TileDisplayState state) { this.state = state; Destroy(displayedOverlay); if (state == TileDisplayState.ATTACK) { displayedOverlay = Instantiate(attackOverlay, this.gameObject.transform) as GameObject; } if (state == TileDisplayState.MOVE) { displayedOverlay = Instantiate(moveOverlay, this.gameObject.transform) as GameObject; } if (state == TileDisplayState.NONE) { //No Op } }