示例#1
0
 public void HandleOnInterstitialFailedToLoad(object sender, AdFailedToLoadEventArgs args)
 {
     MonoBehaviour.print("HandleFailedToReceiveInterstitial event received with message: "
                         + args.Message);
     //ToastMessager.Instance.showToastOnUiThread("HandleFailedToReceiveAd event received with message: " + args.Message);
     AndroidToast.ShowToast("HandleFailedToReceiveInterstitial event received with message: " + args.Message);
 }
    //--------------------------------------
    // INITIALIZE
    //--------------------------------------

    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    void OnGUI()
    {
        if (GUI.Button(new Rect(330, 70, 150, 50), "Show Toast Notification"))
        {
            AndroidToast.ShowToastNotification("Hello Toast", AndroidToast.LENGTH_LONG);
        }
    }
示例#3
0
 public void HandleOnInterstitialLeavingApplication(object sender, EventArgs args)
 {
     MonoBehaviour.print("HandleInterstitialLeavingApplication event received");
     if (TestMode)
     {
         AndroidToast.ShowToast("HandleInterstitialLeavingApplication event received");
     }
     Kixlonzing.Instance.AddKixlonz(40);
 }
示例#4
0
 public void HandleOnAdClosed(object sender, EventArgs args)
 {
     MonoBehaviour.print("HandleAdClosed event received");
     if (TestMode)
     {
         AndroidToast.ShowToast("HandleAdClosed event received");
     }
     Kixlonzing.Instance.AddKixlonz(10);
 }
示例#5
0
 void AdFinished_No(ShowResult result)
 {
     Debug.Log("Ad Finish is " + result);
     AndroidToast.ShowToast("Ad Finish is " + result);
     if (result == ShowResult.Finished)
     {
         // Reward the player
         Kixlonzing.Instance.AddKixlonz(20);
         //AndroidToast.ShowToast("Ad Finished Regular");
     }
 }
 private void Awake()
 {
     if (!isTriedLogin)
     {
         isTriedLogin = true;
         androidToast = gameObject.AddComponent <AndroidToast>();
         PlayGamesPlatform.InitializeInstance(new PlayGamesClientConfiguration.Builder().Build());
         PlayGamesPlatform.DebugLogEnabled = true;
         PlayGamesPlatform.Activate();
         Social.localUser.Authenticate(AuthenticateCallback);
     }
 }
示例#7
0
 public void HandleOnInterstitialLoaded(object sender, EventArgs args)
 {
     MonoBehaviour.print("HandleInterstitialLoaded event received");
     if (TestMode)
     {
         AndroidToast.ShowToast("HandleInterstitialLoaded event received");
     }
     // if(interstitial.IsLoaded()){
     //     Kixlonzing.Instance.AddKixlonz(10);
     //     interstitial.Show();
     // }
     Kixlonzing.Instance.AddKixlonz(10);
 }
示例#8
0
 public override void Process(GenieResponseWrapper inWrapper)
 {
     if (inWrapper.getStatus() == "successful")
     {
         string uid = inWrapper.getStringResult("uid");
         if (uid != Genie.I.UserID)
         {
             Logger.Log("User changed partway through - restarting the application.");
             Genie.I.LogEnd();
             Genie.instance.GetUserResult(true, inWrapper);
             AndroidHelper.RestartActivity();
         }
     }
     else
     {
         AndroidToast.Show("Please sign back into Genie.");
         AndroidHelper.KillActivity();
     }
 }
示例#9
0
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    private void Toast()
    {
        AndroidToast.ShowToastNotification("Hello Toast", AndroidToast.LENGTH_LONG);
    }
    //--------------------------------------
    //  PUBLIC METHODS
    //--------------------------------------

    public void OnShowToastButton()
    {
        AndroidToast.ShowToastNotification("Hello Toast", AndroidToast.LENGTH_LONG);
    }