Ejemplo n.º 1
0
    public void PurchaseCoffeeMaker()
    {
        CoffeeMakerAddition addition = PlayerAdditions.GetCoffeeMakerAddition();

        if (!addition.GetIsUnlocked())
        {
            if (addition.GetPurchaseCosts().HasInInventory())
            {
                addition.GetPurchaseCosts().SubtractFromInventory();
                PlayerAdditions.GetCoffeeMakerAddition().SetIsUnlocked(true);
                ShopCanvas.TriggerAdditionsInfoUpdate();

                // For this to immedialty show up, have to manually trigger
                // because the addition exists in the same scene as the menu
                cabinAdditionHandlers[0].HandleAdditions();
            }
            else
            {
                Debug.Log("Insufficient Resources");
            }
        }
        else
        {
            Debug.Log("Already Purchased: COFFEE MAKER");
        }
    }
Ejemplo n.º 2
0
 public static void SetCoffeeMakerAddition(CoffeeMakerAddition addition)
 {
     coffeeMakerAddition = addition;
 }