public bool PlaceBuilding(iBuildingReceiver tile) { if (tile == null) { return(false); } if (tile.canReceiveBuilding()) { this.transform.position = tile.getPlacementLocation(); tile.ReceiveBuilding(this as iBuildingPlacer); placedRowCol = tile.getRowCol(); //store the hover interface for the tile so that we can passthru hovers on the building tileHover = tile.getGameObject().GetComponent <iHoverable>(); myReceiverTile = tile; return(true); } else { return(false); } }
public void SpawnTransparentBuilding_onCurrentTile() { //If there is a currently hovered tile, and build mode has been activated //Spawn a transparent building on it if (_currentTile_buildMode != null) { //Only place if the tile can receive a building (doesn't have one already) if (_currentTile_buildMode.canReceiveBuilding()) { PlaceTransparentBuilding(_currentTile_buildMode); } } }
public bool PlaceBuilding(iBuildingReceiver tile) { if(tile == null) { return false; } if(tile.canReceiveBuilding()) { this.transform.position = tile.getPlacementLocation(); tile.ReceiveBuilding(this as iBuildingPlacer); placedRowCol = tile.getRowCol(); //store the hover interface for the tile so that we can passthru hovers on the building tileHover = tile.getGameObject().GetComponent<iHoverable>(); myReceiverTile = tile; return true; } else { return false; } }