示例#1
0
 public void _MinusPlayerResources()
 {
     recipe = GetComponent <AddRecipeOnScript>();
     if (recipe.CurrentItemRecipe.RecipesItemsID.Length > 0)
     {
         MinusResources();
     }
 }
示例#2
0
    public void _MinusPlayerResources(bool isSawmill)
    {
        recipe = GetComponent <AddRecipeOnScript>();
        if (recipe.CurrentUpgradeRecipe.RecipesItemsID.Length > 0)
        {
            MinusResources();

            string buildType = "";
            if (isSawmill)
            {
                buildType = "sawmillLVL";
            }
            else
            {
                buildType = "mineLVL";
            }
            SQLiteBD.ExecuteQueryWithoutAnswer($"UPDATE Players SET {buildType} = ({buildType}+1) WHERE id = {GameController.PlayerID}");
            //recipe.RecipreController.UpdateLVL();
        }
    }