示例#1
0
 public static DialogMSG Inst()
 {
     if (_Inst == null)
     {
         GameObject go = new GameObject();
         _Inst = go.AddComponent <DialogMSG>();
     }
     return(_Inst);
 }
示例#2
0
    // appmartよりのcallback
    public void RecievedResultAppMart(string item)
    {
                                #if UNITY_ANDROID
        Debug.Log("Unity::AppMart =>>>> item = " + item);

        if (!item.Contains("Error") && !item.Contains("Resume"))
        {
            if (item.Contains("WaitForValidationPurchase"))
            {
                //決済IDを保存
                settlementId = item.Split('=')[1];

                // TODO ユーザーにコンテンツ提供

                //決済確定
                appmart_shop.ConfirmSettlement();
            }
            else if (item.Contains("successPurchase"))
            {
                //決済成功
                Debug.Log("Unity::AppMart =>>>> buy app mart Ok ");
                DialogMSG.Inst().SetMSG("Purchase Ok:" + settlementId);
                DialogMSG.Inst().Show();
            }
        }
        else
        {
            Debug.Log("Unity::AppMart =>>>> buy appmart false :" + item);

            if (item.Contains("Not AppMart"))
            {
                //appmartがインストールされていません
                Debug.Log("Unity::AppMart =>>>> Appmart not install ");
                DialogMSG.Inst().SetMSG("Appmart not install");
                DialogMSG.Inst().Show();
            }
            else
            {
                //その他のエラーが発生しました
                DialogMSG.Inst().SetMSG("buy appmart false :" + item);
                DialogMSG.Inst().Show();
            }
        }
                                #endif
    }
示例#3
0
 void Start()
 {
     _Inst = this;
 }
示例#4
0
 public void DestroyDiglog()
 {
     Destroy(gameObject);
     _Inst = null;
 }