コード例 #1
0
    public void Collect_Hourly_Bonus()
    {
        hourly_bonus.GetComponent <Collider>().enabled = false;

        getDateTime = DateTime.Now;

        myReels.CreditBought(hourly_reward);

        if (PlayHourlyBonusAnimation != null)
        {
            PlayHourlyBonusAnimation();
        }
        else
        {
            Debug.LogWarning("NOTHING IS ASSIGN TO PlayHourlyBonusAnimation DELEGATE");
        }

        PlayerPrefs.SetInt("last hour", getDateTime.Hour);
        PlayerPrefs.SetInt("last minute", getDateTime.Minute);
        PlayerPrefs.SetInt("last second", getDateTime.Second);
        PlayerPrefs.SetString("hourly date player awarded", getDateTime.Date.ToString());

        hour_playerAwarded   = PlayerPrefs.GetInt("last hour");
        minute_playerAwarded = PlayerPrefs.GetInt("last minute");
        second_playerAwarded = PlayerPrefs.GetInt("last second");

        total_playerAwarded = (hour_playerAwarded * 3600) + (minute_playerAwarded * 60) + second_playerAwarded;

        current_hour   = getDateTime.Hour;
        current_minute = getDateTime.Minute;
        current_second = getDateTime.Second;

        current_total = (current_hour * 3600) + (current_minute * 60) + current_second;

        countdown_time = (float)total_playerAwarded + reward_time_inSec - current_total;

        displayCountdown = true;

        Debug.LogWarning(countdown_time);

        //GA.API.Design.NewEvent("BoughtCoins:HourlyReward");
    }
コード例 #2
0
ファイル: RateUs.cs プロジェクト: joyhooei/PandaManiacSlot
//	public void RateUsPopUp()
//	{
//		showing_no = PlayerPrefs.GetInt ("rate_showing_count", 0);
//		showing_no++;
//		Debug.Log("showing no is" + showing_no);
//
//		if(showing_no == 3 || showing_no == 6|| showing_no == 9 || showing_no == 12 || showing_no == 15 || showing_no == 18 || showing_no == 21 || showing_no == 24)
//		{
//			count = PlayerPrefs.GetInt("rate_pop_up_count", 0);
//			count++;
//
//			if(count <= 5)
//			{
//				IOSRateUsPopUp rate = IOSRateUsPopUp.Create(title, text);
//
//				rate.addEventListener(BaseEvent.COMPLETE, onRatePopUpClose);
//			}
//			PlayerPrefs.SetInt ("rate_pop_up_count", count);
//		}
//		PlayerPrefs.SetInt ("rate_showing_count", showing_no);
//	}

//	private void dismissAler() {
//		IOSNative.dismissCurrentAlert ();
//	}

//	private void onRatePopUpClose(CEvent e)
//	{
//		(e.dispatcher as IOSRateUsPopUp).removeEventListener(BaseEvent.COMPLETE, onRatePopUpClose);
//		string result = e.data.ToString();
//		//IOSNative.showMessage("Result", result + " button pressed");
//		switch((IOSDialogResult)e.data) {
//		case IOSDialogResult.RATED:
//			//Debug.Log ("Yes button pressed");
//			//IOSNative.showMessage("RateUs Result", "Yes button pressed");
//			ActivateRewardPanel();
//			GA.API.Design.NewEvent("RateUs:Yes");
//			break;
//		case IOSDialogResult.REMIND:
//			//Debug.Log ("Remind button pressed");
//			//IOSNative.showMessage("RateUs Result", "Remind later button pressed");
//			GA.API.Design.NewEvent("RateUs:Later");
//			break;
//		case IOSDialogResult.DECLINED:
//			//Debug.Log ("No button pressed");
//			//IOSNative.showMessage("RateUs Result", "No button pressed");
//			GA.API.Design.NewEvent("RateUs:No");
//			break;
//		}
//	}

    public void AddCoinsForReview()
    {
        if (review_coins == "not reviewed")
        {
            slot_machine.CreditBought(free_coins_for_review);
            PlayerPrefs.SetString("Review", "is reviewed");
            Debug.LogWarning(PlayerPrefs.GetString("Review"));
            PlayerPrefs.SetInt("rate_pop_up_count", 10);
//			GameAnalytics.NewDesignEvent("BoughtCoins:FreeReview");
        }
        else if (review_coins == "is reviewed")
        {
            Debug.Log("player was awarded already");
        }
        else
        {
            Debug.Log("PlayerPrefs dont match review string values");
        }
    }
コード例 #3
0
 public static void Coin_package_one_purchased()
 {
     myReels.CreditBought(purchase_1);
     //IOSNativePopUpManager.showMessage("Succesfull purchase", "Handful of Coins is yours now!");
 }
コード例 #4
0
 public static void Coin_package_one_purchased()
 {
     myReels.CreditBought(purchase_1);
     PlayerPrefs.SetString("android_package_1", "paid");
 }