Exemple #1
0
    public bool PlaceBuilding(Vector3 clickedPoint)
    {
        Vector3 snappedPoint = SnapBuildingToGrid(clickedPoint);

        if (CheckIfPlacingPossible(snappedPoint))
        {
            PlayerManager.Instance.RemoveRessources(currentBuildingPlacer.buildingData.cost);
            currentBuildingPlacer.SpawnBuildingForConstruction();
            return(true);
        }
        else
        {
            return(false);
        }
    }