Ejemplo n.º 1
0
 public bool BuyUpgrade(GlobalVariables.TOOL tool)
 {
     if (tool == GlobalVariables.TOOL.CHISEL)
     {
         if (score.score >= GV.ChiselUpgradeCost)
         {
             score.BuyObject(GV.ChiselUpgradeCost);
             GV.ChiselDamage      += 1;
             GV.ChiselUpgradeCost *= GV.ChiselUpgradeCostMultiplier;
             return(true);
         }
         return(false);
     }
     if (tool == GlobalVariables.TOOL.HAMMER)
     {
         if (score.score >= GV.HammerUpgradeCost)
         {
             score.BuyObject(GV.HammerUpgradeCost);
             GV.HammerDamage      += 1;
             GV.HammerUses         = 0;
             GV.HammerUpgradeCost *= GV.HammerUpgradeCostMultiplier;
             GV.HammerUsesCost    *= GV.HammerUsesCostMultiplier;
             return(true);
         }
         return(false);
     }
     if (tool == GlobalVariables.TOOL.BUSTER)
     {
         if (score.score >= GV.BusterUpgradeCost)
         {
             score.BuyObject(GV.BusterUpgradeCost);
             GV.BusterDamage      += 1;
             GV.BusterUses         = 0;
             GV.BusterUpgradeCost *= GV.BusterUpgradeCostMultiplier;
             GV.BusterUsesCost    *= GV.HammerUsesCostMultiplier;
         }
         return(false);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public bool BuyUses(GlobalVariables.TOOL tool)
 {
     if (tool == GlobalVariables.TOOL.HAMMER)
     {
         if (score.score >= GV.HammerUsesCost)
         {
             score.BuyObject(GV.HammerUsesCost);
             GV.HammerUses += 20;
             return(true);
         }
         return(false);
     }
     if (tool == GlobalVariables.TOOL.BUSTER)
     {
         if (score.score >= GV.BusterUsesCost)
         {
             score.BuyObject(GV.BusterUsesCost);
             GV.BusterUses += 1;
             return(true);
         }
         return(false);
     }
     return(false);
 }