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); }
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); }
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); }