public void OnGameStart() { AudioManager.PlayTrigger("game_start"); if (!Env.IsSandbox) { Env.Console.ExecuteString("map Canyon"); } GameApp = Application.Instantiate <SydewinderApp>(); // Initialize Highscore with file name. Highscore.InitializeFromFile(HIGHSCORE_URL); GameApp.GameOver += showHighscore => { // Reset field of view to ehance 3D look. Camera.FieldOfView = 60f; UI.MainMenu.SetInactive(); if (showHighscore) { UI.MainMenu.SetupHighscoreMenuPerspective(); } else { UI.MainMenu.SetupMainMenuPerspective(); } }; InitializeMainMenu(); }
/// <summary> /// Called when engine is being shut down or if application is reloaded. /// </summary> public override void Shutdown() { if (GameApp != null) { UI.MainMenu.DestroyMenu(); GameApp.Shutdown(false); GameApp.Destroy(); GameApp = null; } }
public override void Initialize() { GameApp = Application.Instantiate <SydewinderApp>(); }