Exemplo n.º 1
0
    private void ConfirmPlacement()
    {
        placingBuildingBehavior.SetPendingPlacement(true);

        gameSparksManager.BuyBuilding("farm", placingBuildingBehavior.transform.position, (LogEventResponse response) => {
            placingBuildingBehavior.SetPendingPlacement(false);
            if (!response.HasErrors)
            {
                placingBuildingBehavior.ConfirmPlacement();
                placingBuildingBehavior = null;


                // Building buildingData = (Building)GSDataHelpers.GSDataToObject(buildingGSData);
                //  gameData.AddBuilding(buildingData);
                //  BuildingBehavior newBuilding = Instantiate<BuildingBehavior>(farmPrefab);
                //  newBuilding.transform.position = new Vector2(buildingData.posX, buildingData.posY);
                //  dataGameObjectsMap.Add(buildingData, newBuilding.gameObject);
            }
        });
    }
Exemplo n.º 2
0
 private void ConfirmPlacement()
 {
     placingBuildingBehavior.ConfirmPlacement();
     placingBuildingBehavior = null;
 }