Esempio n. 1
0
 public void DenyCustomer()
 {
     if (denyCorrect)
     {
         customerSpawner.PlayAnimation("Angry");
         SoundManager.instance.PlaySingle(SoundManager.angrySound);
     }
     // if player wasn't supposed to deny customer but did
     else
     {
         // increment mistake counter
         ++mistakeAmount;
         // play emote and destroy customer
         customerSpawner.PlayAnimation("Wrong");
         SoundManager.instance.PlaySingle(SoundManager.incorrectSound);
     }
 }
Esempio n. 2
0
    private void CheckOTCPotion(string potionName)
    {
        // referencing customer
        customer = GameObject.Find("Customer").GetComponent <Customer>();

        // if player selects the potion that is on customer's order
        if (potionName.Equals(customer.CustomerOrder.OrderPotion.PotionName))
        {
            // add potion amount to player's gold amount and destroy customer
            player.GoldAmount += customer.CustomerOrder.OrderPotion.price;
            customerSpawner.PlayAnimation("Correct");
            playSoldSound = true;

            OpenCloseOTC();
        }
        // if player makes a mistake, increment counter and destroy customer
        else
        {
            player.MistakeAmount += 1;
            OpenCloseOTC();
            customerSpawner.PlayAnimation("Wrong");
            SoundManager.instance.PlaySingle(SoundManager.incorrectSound);
        }
    }