Ejemplo n.º 1
0
        public UnibillConfiguration (IResourceLoader loader, UnibillXmlParser parser, IUtil util, ILogger logger) {
            var element = parser.Parse ("unibillInventory", "inventory") [0];
            string o = null;
            element.kvps.TryGetValue("iOSSKU", out o);
            iOSSKU = o;
            element.kvps.TryGetValue("GooglePlayPublicKey", out o);
            GooglePlayPublicKey = o;
            this.AmazonSandboxEnabled = bool.Parse (element.kvps ["useAmazonSandbox"]);
			
			CurrentPlatform = BillingPlatform.MacAppStore;
#if UNITY_ANDROID
            CurrentPlatform = (BillingPlatform) Enum.Parse(typeof(BillingPlatform), element.kvps["androidBillingPlatform"]);
#endif
#if UNITY_IPHONE
            CurrentPlatform = BillingPlatform.AppleAppStore;
#endif
        }
Ejemplo n.º 2
0
 public HelpCentre (UnibillXmlParser parser) {
     foreach (var element in parser.Parse("unibillStrings", "unibillError")) {
         UnibillError error = (UnibillError) Enum.Parse(typeof(UnibillError), element.attributes["id"]);
         helpMap[error] = element.kvps["message"];
     }
 }