示例#1
0
    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);
        }
    }
示例#2
0
    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;
        }
    }