Ejemplo n.º 1
0
 /// <summary>
 /// Initialise Unibill.
 /// Before calling this method, ensure you have subscribed to onBillerReady to
 /// ensure you receive Unibill's initialisation response.
 /// This method should be called once as soon as your Application launches.
 /// </summary>
 public static void Initialise()
 {
     if (Unibiller.biller == null) {
         var mgr = new RemoteConfigManager(new UnityResourceLoader(), new UnityPlayerPrefsStorage(), new UnityLogger(), UnityEngine.Application.platform);
         var config = mgr.Config;
         var o = new GameObject ();
         var util = o.AddComponent<UnityUtil> ();
         var factory = new BillerFactory (new UnityResourceLoader (), new UnityLogger (), new UnityPlayerPrefsStorage (), new RawBillingPlatformProvider (config), config, util);
         Biller b = factory.instantiate ();
         _internal_doInitialise(b, factory);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initialise Unibill.
 /// Before calling this method, ensure you have subscribed to onBillerReady to
 /// ensure you receive Unibill's initialisation response.
 /// This method should be called once as soon as your Application launches.
 /// </summary>
 public static void Initialise () {
     if (Unibiller.biller == null) {
         var mgr = new RemoteConfigManager(new UnityResourceLoader(), new UnityPlayerPrefsStorage(), new UnityLogger(), UnityEngine.Application.platform);
         var config = mgr.Config;
         _internal_doInitialise(new BillerFactory(new UnityResourceLoader(), new UnityLogger(), new UnityPlayerPrefsStorage(), new RawBillingPlatformProvider(config), config).instantiate());
     }
 }