コード例 #1
0
ファイル: InventoryEditor.cs プロジェクト: dqtoy/golffun
 public override void onGUI()
 {
     base.onGUI();
     priceInLocalCurrency = (decimal)EditorGUILayout.FloatField("Price in your local currency:", (float)priceInLocalCurrency);
     item.platformBundles[BillingPlatform.GooglePlay]["priceInLocalCurrency"] = priceInLocalCurrency;
     this.defaultLocale = (GooglePlayLocale)EditorGUILayout.EnumPopup("Default locale:", defaultLocale);
     item.platformBundles[BillingPlatform.GooglePlay]["defaultLocale"] = defaultLocale.ToString();
 }
コード例 #2
0
ファイル: InventoryEditor.cs プロジェクト: dqtoy/golffun
        public GooglePlayEditor(PurchasableItem rootItem) : base(rootItem, BillingPlatform.GooglePlay)
        {
            var bundle = rootItem.platformBundles[BillingPlatform.GooglePlay];
            {
                this.priceInLocalCurrency = 1;
                if (bundle.ContainsKey("priceInLocalCurrency"))
                {
                    decimal.TryParse(bundle["priceInLocalCurrency"].ToString(), out priceInLocalCurrency);
                }
            }

            {
                if (bundle.ContainsKey("defaultLocale"))
                {
                    this.defaultLocale = (GooglePlayLocale)Enum.Parse(typeof(GooglePlayLocale), (string)bundle["defaultLocale"]);
                }
                else
                {
                    this.defaultLocale = GooglePlayLocale.en_US;
                }
            }
        }
コード例 #3
0
ファイル: InventoryEditor.cs プロジェクト: nhhoang/shooting
 public override void onGUI () {
     base.onGUI ();
     priceInLocalCurrency = (decimal) EditorGUILayout.FloatField ("Price in your local currency:", (float) priceInLocalCurrency);
     this.defaultLocale = (GooglePlayLocale) EditorGUILayout.EnumPopup ("Default locale:", defaultLocale);
 }
コード例 #4
0
ファイル: InventoryEditor.cs プロジェクト: nhhoang/shooting
        public GooglePlayEditor(XElement rootItem) : base(rootItem, BillingPlatform.GooglePlay) {
            {
                XElement priceInLocalCurrency = rootItem.XPathSelectElement("platforms/GooglePlay/priceInLocalCurrency");
                this.priceInLocalCurrency = 1;
                if (null != priceInLocalCurrency) {
                    this.priceInLocalCurrency = (decimal) priceInLocalCurrency;
                }
            }

            {
                XElement defaultLocale = rootItem.XPathSelectElement("platforms/GooglePlay/defaultLocale");
                if (null != defaultLocale) {
                    this.defaultLocale = (GooglePlayLocale) Enum.Parse(typeof(GooglePlayLocale), (string) defaultLocale);
                } else {
                    this.defaultLocale = GooglePlayLocale.en_US;
                }
            }
        }
コード例 #5
0
 public override void onGUI () {
     base.onGUI ();
     priceInLocalCurrency = (decimal) EditorGUILayout.FloatField ("Price in your local currency:", (float) priceInLocalCurrency);
     item.platformBundles[BillingPlatform.GooglePlay]["priceInLocalCurrency"] = priceInLocalCurrency;
     this.defaultLocale = (GooglePlayLocale) EditorGUILayout.EnumPopup ("Default locale:", defaultLocale);
     item.platformBundles[BillingPlatform.GooglePlay]["defaultLocale"] = defaultLocale.ToString();
 }
コード例 #6
0
        public GooglePlayEditor(PurchasableItem rootItem) : base(rootItem, BillingPlatform.GooglePlay) {

            var bundle = rootItem.platformBundles[BillingPlatform.GooglePlay];
            {
                this.priceInLocalCurrency = 1;
                if (bundle.ContainsKey("priceInLocalCurrency")) {
                    decimal.TryParse(bundle["priceInLocalCurrency"].ToString(), out priceInLocalCurrency);
                }
            }

            {
                if (bundle.ContainsKey("defaultLocale")) {
                    this.defaultLocale = (GooglePlayLocale) Enum.Parse(typeof(GooglePlayLocale), (string) bundle["defaultLocale"]);
                } else {
                    this.defaultLocale = GooglePlayLocale.en_US;
                }
            }
        }