Exemple #1
0
        public void Init()
        {
            CardGameDataManager = GameHandler.instance.CardGameDataManager;
            isStealingActive    = false;
            CardGameDataManager.SetStealingPossibility();
            stealPossibility = CardGameDataManager.GetStealingPossibility();

            int randomNum = Random.Range(1, 101);

            if (randomNum < stealPossibility)
            {
                isStealingActive = true;
            }
        }
        public void BidIncreaseButtonPressed()
        {
            CardGameDataManager cardGameDataManager = GameHandler.instance.CardGameDataManager;
            float bidAmount = 0;

            float.TryParse(bidAmountText.text, out bidAmount);

            if (bidAmount >= cardGameDataManager.GetGamblersMoney() / cardGameDataManager.GetRatio())
            {
                return;
            }

            bidAmount++;
            bidAmountText.text = bidAmount.ToString();
        }