Ejemplo n.º 1
0
        internal async Task <Urho.Application> Launcher(Type type, ApplicationOptions options)
        {
            await launcherSemaphore.WaitAsync();

            if (app != null)
            {
                app.Engine.Exit();
                Urho.Application.StopCurrent();
            }

            applicationTaskSource     = new TaskCompletionSource <Application>();
            Urho.Application.Started += UrhoApplicationStarted;
            if (surface != null)
            {
                surface.RemoveFromSuperview();
                //app.Graphics.Release (false, false);
            }
            this.Add(surface = new Urho.iOS.UrhoSurface(this.Bounds));

            await surface.InitializeTask;

            app = Urho.Application.CreateInstance(type, options);
            app.Run();

            return(await applicationTaskSource.Task);
        }
Ejemplo n.º 2
0
        internal async Task <Urho.Application> Launcher(Type type, ApplicationOptions options)
        {
            await launcherSemaphore.WaitAsync();

            if (app != null)
            {
                app.Exit();
            }

            applicationTaskSource     = new TaskCompletionSource <Application>();
            Urho.Application.Started += UrhoApplicationStarted;
            if (surface != null)
            {
                surface.RemoveFromSuperview();
            }
            surface = new Urho.iOS.UrhoSurface(this.Bounds);
            surface.AutoresizingMask = UIViewAutoresizing.All;
            this.Add(surface);

            await surface.InitializeTask;

            app = Urho.Application.CreateInstance(type, options);
            app.Run();

            return(await applicationTaskSource.Task);
        }
Ejemplo n.º 3
0
        public void SetUrhoApplicationReference(Urho.Application application)
        {
            // Copy reference
            urhoApplicationReference = application;

            // Application can now begin streaming
            StartStreaming();
        }
Ejemplo n.º 4
0
        internal async Task <Urho.Application> Launcher(Type type, ApplicationOptions options)
        {
            await launcherSemaphore.WaitAsync();

            if (surface != null)
            {
                await surface.Stop();

                surface.RemoveFromSuperview();
            }
            surface = new Urho.iOS.UrhoSurface(this.Bounds);
            surface.AutoresizingMask = UIViewAutoresizing.All;
            this.Add(surface);
            app = await surface.Show(type, options);

            launcherSemaphore.Release();
            return(app);
        }
Ejemplo n.º 5
0
 public void OnNavigatedFrom(NavigationParameters parameters)
 {
     // Exit 3D application and nullify as we move away from view
     Urho.Forms.UrhoSurface.OnDestroy();
     urhoApplicationReference = null;
 }