Exemplo n.º 1
0
 public void SellCamelButtonClick(GameObject camel)
 {
     if (camelCount > 1)
     {
         if (camel.GetComponentInChildren <ItemSlot>().heldItem != null)
         {
             DisplayHelpTextMessage("Cannot sell a camel with a filled inventory");
         }
         else
         {
             camel.SetActive(false);
             playerMoney.AddExtraMoney(camelValue);
             DisplayHelpTextMessage("Camel sold for " + camelValue + " extra coins.");
             camelCount--;
         }
     }
     else
     {
         DisplayHelpTextMessage("Cannot sell your last camel.");
     }
 }