private void OnSelectItem(GameObject go) { PaymentManager.Bundle dataOfClass = DataSource.FindDataOfClass <PaymentManager.Bundle>(go, (PaymentManager.Bundle)null); if (dataOfClass == null) { return; } GlobalVars.SelectedProductID = dataOfClass.productID; GlobalVars.SelectedProductPrice = dataOfClass.price; GlobalVars.SelectedProductIcon = dataOfClass.iconImage; FlowNode_GameObject.ActivateOutputLinks((Component)this, 100); }
public List <PaymentManager.Bundle> GetBundles() { List <PaymentManager.Bundle> bundleList = new List <PaymentManager.Bundle>(); foreach (string bundleId in this.BundleIds) { PaymentManager.Bundle bundle = PaymentManager.Bundle.Create(bundleId); if (bundle != null) { bundleList.Add(bundle); } } return(bundleList); }
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); }