Example #1
0
 public void Play()
 {
     if (slot.state == CustomSlot.State.Idle && slot.gameInfo.balance < slot.gameInfo.roundCost)
     {
         assets.audioBeep.Play();
         return;
     }
     if (keepPlaying)
     {
         keepPlaying = false;
         _dontStopButtonBackground.GetComponentInChildren <Text>().text = "AUTO\n SPIN";
     }
     slot.Play();
 }
Example #2
0
 public void Play()
 {
     if (slot.state == CustomSlot.State.Idle && !setting.allowDebt && slot.gameInfo.balance < slot.gameInfo.roundCost)
     {
         assets.audioBeep.Play();
         Debug.Log("You're out of Quarters. [purchase]");
         return;
     }
     else
     {
         if (Application.isEditor)
         {
             slot.Play();
             PlayerPrefs.SetInt("quartersBalance", slot.gameInfo.balance);
         }
         else
         {
             SpendQuarters(slot.gameInfo.roundCost, "Pay " + slot.gameInfo.roundCost + " Quarters for round cost.");
         }
     }
 }
Example #3
0
        private void SpendQuarters(int amount, string description)
        {
            TransferAPIRequest request = new TransferAPIRequest(amount, description, delegate(string transactionHash) {
                Debug.Log("Quarters transferred: " + transactionHash);

                slot.Play();
                PlayerPrefs.SetInt("quartersBalance", slot.gameInfo.balance);
            }, delegate(string error) {
                Debug.LogError(error);
            });

            Quarters.Instance.CreateTransfer(request);
        }