Browse Source

Merge branch 'master' of http://git.dashgame.com/fenix/battlearray_client

Fenix 8 years ago
parent
commit
a557896387

+ 4 - 1
Assets/DashGame/Kits/Language.cs

@@ -59,7 +59,10 @@ public class Language
 
 	private static SystemLanguage GetSystemLanguage()
 	{
-		return SystemLanguage.English;
+		if (Config.USER_PORT == Config.USER_PORT_INTERNATIONAL)
+			return SystemLanguage.English;
+		else
+			return SystemLanguage.Chinese;
 //		return SystemLanguage.Chinese;
 	}
 

BIN
Assets/Scenes/Battle.unity


+ 3 - 2
Assets/Scripts/Config.cs

@@ -16,6 +16,7 @@ public class Config
 	public const string USER_PORT_CHINA = "";
 	public const string USER_PORT_INTERNATIONAL = "intl";
 	public static string USER_PORT = USER_PORT_INTERNATIONAL;
+//	public static string USER_PORT = USER_PORT_CHINA;
 
 
 //	public static bool USE_LOCAL_SERVER = true;
@@ -24,10 +25,10 @@ public class Config
 //	public static string LOCAL_SERVER_ADDRESS = "192.168.1.52";
 	public static string LOCAL_SERVER_ADDRESS = "127.0.0.1";
 
-//	public static string SERVER_ADDRESS = "121.199.20.79";
+	public static string SERVER_ADDRESS = "121.199.20.79";
 //	public static string SERVER_ADDRESS = "127.0.0.1";
 //	public static string SERVER_ADDRESS = "192.168.1.102";
-	public static string SERVER_ADDRESS = "139.219.184.31";
+//	public static string SERVER_ADDRESS = "139.219.184.31";
 	public static string URL_ADDRESS = "http://121.199.20.79/battlearray/";
 	
 //	public static string SERVER_ADDRESS = "47.90.201.47";

+ 35 - 17
Assets/Scripts/UI/Shop/PaymentManager.cs

@@ -15,30 +15,48 @@ public class PaymentManager : IStoreListener
 
 	public PaymentManager () 
 	{
-		var builder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
-		builder.AddProduct("VIP4", ProductType.Subscription, new IDs
-			{
-				{"VIP4_EN", GooglePlay.Name},
-				{"VIP4_EN", AppleAppStore.Name}
+		var builder = ConfigurationBuilder.Instance (StandardPurchasingModule.Instance ());
+		if (Config.USER_PORT == Config.USER_PORT_INTERNATIONAL) {
+			builder.AddProduct ("VIP4", ProductType.Subscription, new IDs {
+				{ "VIP4_EN", GooglePlay.Name },
+				{ "VIP4_EN", AppleAppStore.Name }
 			});
 
-		builder.AddProduct("C10000", ProductType.Consumable, new IDs
-			{
-				{"C10000_EN", GooglePlay.Name},
-				{"C10000_EN", AppleAppStore.Name}
+			builder.AddProduct ("C10000", ProductType.Consumable, new IDs {
+				{ "C10000_EN", GooglePlay.Name },
+				{ "C10000_EN", AppleAppStore.Name }
 			});
 
-		builder.AddProduct("C25000", ProductType.Consumable, new IDs
-			{
-				{"C25000_EN", GooglePlay.Name},
-				{"C25000_EN", AppleAppStore.Name}
+			builder.AddProduct ("C25000", ProductType.Consumable, new IDs {
+				{ "C25000_EN", GooglePlay.Name },
+				{ "C25000_EN", AppleAppStore.Name }
 			});
 
-		builder.AddProduct("C75000", ProductType.Consumable, new IDs
-			{
-				{"C75000_EN", GooglePlay.Name},
-				{"C75000_EN", AppleAppStore.Name}
+			builder.AddProduct ("C75000", ProductType.Consumable, new IDs {
+				{ "C75000_EN", GooglePlay.Name },
+				{ "C75000_EN", AppleAppStore.Name }
 			});
+		} else {
+			builder.AddProduct ("VIP4", ProductType.Subscription, new IDs {
+				{ "VIP4", GooglePlay.Name },
+				{ "VIP4", AppleAppStore.Name }
+			});
+
+			builder.AddProduct ("C10000", ProductType.Consumable, new IDs {
+				{ "C10000", GooglePlay.Name },
+				{ "C10000", AppleAppStore.Name }
+			});
+
+			builder.AddProduct ("C25000", ProductType.Consumable, new IDs {
+				{ "C25000", GooglePlay.Name },
+				{ "C25000", AppleAppStore.Name }
+			});
+
+			builder.AddProduct ("C75000", ProductType.Consumable, new IDs {
+				{ "C75000", GooglePlay.Name },
+				{ "C75000", AppleAppStore.Name }
+			});
+		}
 
 		#if RECEIPT_VALIDATION
 		validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.bundleIdentifier);

BIN
Assets/XlsxSource/Chinese/shop_config.xlsx