public void StartGame() { ClientServer.MyServer.Run(); //Process.Start("Z:\\!Ivasuk\\!SE\\PZ24\\MAPZ\\mapz\\Patterns\\GAME\\Server\\bin\\Debug\\Server.exe"); SoundPlayerSingletone.GetPlayerIstanse().PlayByRelPath("\\Sound\\MenuOST.wav"); CreateWorld(); Console.CursorVisible = false; menuDrawer = new StartMenuDrawer(); CurrentMenu = ((StartMenuDrawer)menuDrawer).StartMenu; ReservHandlers(); questsManeger.CreateStartQuests(); MyRaceiver = new CommandPattern.Receiver(this.GameUI, this.player, this.CurrentMenu); KListener = new KeyListener(); KListener.SetReceiver(MyRaceiver); KListener.StartListen(); while (true) { string selectedMenuItem = menuDrawer.DrawMenu(CurrentMenu).ToLower(); if (!menuHandler.HandleItem(selectedMenuItem)) { Console.Clear(); } } }
public static SoundPlayerSingletone GetPlayerIstanse() { lock (padlock) { if (PlayerSinglton == null) { PlayerSinglton = new SoundPlayerSingletone(); } return(PlayerSinglton); } }