-
Notifications
You must be signed in to change notification settings - Fork 0
/
RateUs.cs
41 lines (31 loc) · 906 Bytes
/
RateUs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using UnityEngine;
using System.Collections;
public class RateUs : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void RateTheGame()
{
IOSRateUsPopUp rate = IOSRateUsPopUp.Create("Like this game?", "Please rate to support future updates!");
rate.OnComplete += onRatePopUpClose;
}
private void onRatePopUpClose(IOSDialogResult result) {
switch(result) {
case IOSDialogResult.RATED:
Debug.Log ("Rate button pressed");
IOSNativeUtility.RedirectToAppStoreRatingPage();
break;
case IOSDialogResult.REMIND:
Debug.Log ("Remind button pressed");
break;
case IOSDialogResult.DECLINED:
Debug.Log ("Decline button pressed");
break;
}
IOSNativePopUpManager.dismissCurrentAlert();
//IOSNativePopUpManager.showMessage("Result", result.ToString() + " button pressed");
}
}