Beispiel #1
0
 private void OnSelectItem(GameObject go)
 {
     PaymentManager.Product dataOfClass = DataSource.FindDataOfClass <PaymentManager.Product>(go, (PaymentManager.Product)null);
     if (dataOfClass == null)
     {
         return;
     }
     GlobalVars.SelectedProductID = dataOfClass.productID;
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
 }
Beispiel #2
0
 private void OnOpenItemDetail(GameObject go)
 {
     PaymentManager.Product dataOfClass = DataSource.FindDataOfClass <PaymentManager.Product>(go, (PaymentManager.Product)null);
     if (!Object.op_Equality((Object)this.mDetailInfo, (Object)null) || dataOfClass == null)
     {
         return;
     }
     this.mDetailInfo = (GameObject)Object.Instantiate <GameObject>((M0)this.DetailTemplate);
     DataSource.Bind <PaymentManager.Product>(this.mDetailInfo, dataOfClass);
     this.mDetailInfo.SetActive(true);
 }
Beispiel #3
0
    public List <PaymentManager.Product> GetProducts()
    {
        List <PaymentManager.Product> productList = new List <PaymentManager.Product>();

        foreach (string productId in this.ProductIds)
        {
            PaymentManager.Product product = PaymentManager.Product.Create(productId);
            if (product != null)
            {
                productList.Add(product);
            }
        }
        return(productList);
    }
Beispiel #4
0
    public static string ReplaceTag(string text)
    {
        FixParam fixParam = MonoSingleton <GameManager> .Instance.MasterParam.FixParam;

        text = text.Replace("<fix:continue_cost>", fixParam.ContinueCoinCost.ToString());
        text = text.Replace("<fix:continue_cost_multi>", fixParam.ContinueCoinCostMulti.ToString());
        text = text.Replace("<fix:abilupcoin>", fixParam.AbilityRankUpCountCoin.ToString());
        PaymentManager.Product product = MonoSingleton <PaymentManager> .Instance.GetProduct(GlobalVars.SelectedProductID);

        if (product != null && !string.IsNullOrEmpty(product.name))
        {
            text = text.Replace("<selected_product>", product.name);
        }
        PaymentManager.Bundle bundle = MonoSingleton <PaymentManager> .Instance.GetBundle(GlobalVars.SelectedProductID);

        if (bundle != null && !string.IsNullOrEmpty(bundle.name))
        {
            string newValue = LocalizedText.Get("bundle." + bundle.name);
            text = text.Replace("<selected_bundle>", newValue);
        }
        string newValue1 = string.Format(LocalizedText.Get("sys.BIRTHDAY_FORMAT"), (object)GlobalVars.EditedYear, (object)GlobalVars.EditedMonth, (object)GlobalVars.EditedDay);

        text = text.Replace("<birthday>", newValue1);
        if (Object.op_Inequality((Object)SceneBattle.Instance, (Object)null))
        {
            text = text.Replace("<photon_err>", SceneBattle.Instance.PhotonErrorString);
            text = text.Replace("<mp_first_contact>", SceneBattle.Instance.FirstContact.ToString());
        }
        else
        {
            text = text.Replace("<photon_err>", "0");
            text = text.Replace("<mp_first_contact>", "0");
        }
        string newValue2 = string.Format(LocalizedText.Get("sys.FB_DATAFOUND_MESSAGE"), (object)GlobalVars.NewPlayerLevel, (object)GlobalVars.NewPlayerName);

        text = text.Replace("<fb_load>", newValue2);
        return(text);
    }