public static void ApplicasaInitDidFinishCallback(bool success, Applicasa.Error error)
 {
     if (success)
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Applicasa init Finish ");
         finishedInit = true;
     }
     else
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Couldn't initialize Applicasa ");
     }
 }
 private static void HandleImageData(bool success, Applicasa.Error error, Applicasa.FileCache.ByteArray data)
 {
     if (success)
     {
         imageData = Applicasa.FileCache.GetByteArray(data);
     }
     else
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Get image error " + error.Id + "-" + error.Message);
         imageData = new byte[0];
     }
 }
 public static void HandleVirtualCurrencyPurchase(bool success, Applicasa.Error error, string itemId, Applicasa.Actions action)
 {
     if (success)
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Store Purchase success");
         //Update User virtual currency balance
         UpdateVirtualCurrencyBalance();
     }
     else
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Store Purchase error: " + error.Id + "-" + error.Message);
     }
 }
예제 #4
0
 public static void FacebookLoginCallback(bool success, Applicasa.Error error, string itemID, Applicasa.Actions action)
 {
     if (success)
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Applicasa Logged In");
         UpdateUserDisplay();
         UpdateVirtualCurrencyBalance();
         Application.LoadLevel("AppFacebookScene");
     }
     else
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Applicasa didn't Log In");
     }
 }
 public static void HandleGetVirtualCurrencies(bool success, Applicasa.Error error, Applicasa.VirtualCurrency.VirtualCurrencyArray virtualCurrencyArrayPtr)
 {
     if (success)
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Get virtual currencies success");
         Applicasa.VirtualCurrency[] virtualCurrencies = Applicasa.VirtualCurrency.GetVirtualCurrencyArray(virtualCurrencyArrayPtr);
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Virtual currencies item count = " + virtualCurrencies.Length);
         //Load Store Items to list
         instance.StartCoroutine(instance.LoadVirtualCurrencies(virtualCurrencies));
     }
     else
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Get virtual currency error " + error.Id + "-" + error.Message);
     }
 }
예제 #6
0
 public static void PromotionCallback(bool success, Applicasa.Error error, Applicasa.Promotion.PromotionArray promotionArrayPtr)
 {
     if (success)
     {
         Applicasa.Promotion[] promotions = Applicasa.Promotion.GetPromotionArray(promotionArrayPtr);
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Got " + promotions.Length + " promotions");
         if (promotions.Length > 0)
         {
             promotions [0].Show(PromoResult);
         }
     }
     else
     {
         Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": Couldn't get promotions");
     }
 }
예제 #7
0
 public static void GetThirdPartyActionArray(bool success, Applicasa.Error error, Applicasa.ThirdPartyAction[] result)
 {
     UpdateVirtualCurrencyBalance();
     Debug.Log("LiLog_Unity " + System.DateTime.Now.ToShortTimeString() + ": GetTrialPayActionArray number of actions = " + (result == null?"0":result.Length.ToString()));
 }