예제 #1
0
파일: Game.cs 프로젝트: carriercomm/scsharp
		public void SwitchToScreen (UIScreenType screenType)
		{
			int index = (int)screenType;
			if (screens[index] == null) {
				switch (screenType) {
				case UIScreenType.MainMenu:
					screens[index] = new MainMenu (installedMpq);
					break;
				case UIScreenType.Login:
					screens[index] = new LoginScreen (playingMpq);
					break;
				case UIScreenType.Connection:
					screens[index] = new ConnectionScreen (playingMpq);
					break;
				default:
					throw new Exception ();
				}
			}

			SwitchToScreen (screens[(int)screenType]);
		}