Пример #1
0
    void Awake()
    {
        // Ask for permission to show local notifications
        // It can be done at any point in the application

        if (!_hasLocalNotificationPermission)
        {
            Enhance.RequestLocalNotificationPermission(OnPermissionGranted, OnPermissionRefused);
        }

        // Set currency callback (offerwalls)
        // It is important to do in the beginning of the application's logic

        Enhance.SetReceivedCurrencyCallback(onCurrencyReceived);
        UpdateIAPLabel();
        SetIapProductSku("Extra10Gems");
    }
Пример #2
0
 /**
  * Set currency received callback
  *
  * @param onCurrencyReceived callback executed when a currency is received
  */
 public static void SetReceivedCurrencyCallback(Action <int> onCurrencyReceived)
 {
     Enhance.SetReceivedCurrencyCallback(onCurrencyReceived);
 }