public static void RunGame() { game = new PhysicsGame(); // iOS requires a user triggered action to play web audio if (CustomScripts.IsIOS()) { game.Content.OnAllResourceLoaded = () => { game.IsActive = false; Html5.Canvas.Remove(); HTMLButtonElement button = new HTMLButtonElement(); button.InnerHTML = "Activate web audio for iOS"; button.SetAttribute("style", CustomScripts.FullScreenButtonStyle); button.OnClick = (e) => { WebAudioHelper.Activate(); Document.Body.RemoveChild(button); game.IsActive = true; Document.Body.AppendChild(Html5.Canvas); }; Document.Body.AppendChild(button); }; } game.Run(); }
static void Main() { using (var game = new PhysicsGame()) { game.Run(); } }