示例#1
0
    IEnumerator AddMoney()                                                                                                         //coroutine pridaj peniaze a.k.a casovac
    {
        yield return(new WaitForSeconds(timer));                                                                                   //počkaj určitý čas (timer)

        int pomoc = (int)UnityEngine.Random.Range(lowerReward + (lowerReward * player.skill.GetValue() / 10), higherReward + (higherReward * player.skill.GetValue()) / 10);

        player.AddMoney(pomoc);                                           //po ubehnutí času pridaj hráčovi peniaze
    }
示例#2
0
 public void Sell(Item item)
 {
     items.Remove(item);
     character.AddMoney(item.cost / 2);
     if (onItemChangedCallback != null)
     {
         onItemChangedCallback.Invoke();
     }
     item.isBought = false;
 }