Init() public method

Initializes the facade. Should only be called once.
public Init ( Android context, string developerUuid ) : void
context Android An Android Context object. Usually the Activity object.
developerUuid string The developer UUID, which is obtained from the developer portal.
return void
Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            Game1.Activity = this;
            var g = new Game1();
            SetContentView(g.Window);
            g.Run();

            PurchaseFacade = OuyaFacade.Instance;
            PurchaseFacade.Init(this, DEVELOPER_ID);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            facade = OuyaFacade.Instance;
            facade.Init(Activity, "insert your developer key here");

            base.Initialize();
            
            // Start the IAP test as an async task so it runs in the background.
            DoIapTest();
        }
Ejemplo n.º 3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            Game1.Activity = this;
            var g = new Game1();
            SetContentView(g.Window);
            g.Run();

            byte[] applicationKey = null;
            using (var stream = Resources.OpenRawResource(Resource.Raw.key))
            {
                using (var ms = new MemoryStream())
                {
                    stream.CopyTo(ms);
                    applicationKey = ms.ToArray();
                }
            }

            PurchaseFacade = OuyaFacade.Instance;
            PurchaseFacade.Init(this, DEVELOPER_ID, applicationKey);
        }