void Awake() { if (instance == null) { instance = this; } }
/// <summary> /// Unload game content. /// </summary> public void Unload() { GameManager.Content.Unload(); NetworkHandler = null; Background = null; Gui = null; LocalPlayer.Reset(); }
/// <summary> /// Loads anything that we missed. Really, this should do nothing, but /// it is required by IScene. /// </summary> /// <param name="handover">null.</param> public void Load(object handover) { NetworkHandler = (GameNetworkHandler)handover; Background = new Background(); Gui = new InGameGui(); Desktop.Root = Gui; SoundManager.PlaySong("Music/bg_heartbeat"); LocalPlayer.StartEffects(); }