void DisplayFinishScreen() { currentScreen = ScreenEnum.Finish; Terminal.ClearScreen(); switch (currentLevel) { case 1: Terminal.WriteLine("MAN OF FOREST!"); break; case 2: Terminal.WriteLine("MAN FOUND CURE!"); break; case 3: Terminal.WriteLine("JOIN THE DARK?!"); break; } Terminal.WriteLine(@" __ / \_________ | 0 ___ ___ / \__/ ^ ^ HERE IS THE KEY! "); Terminal.WriteLine("Type \"menu\" to return to Main Menu"); }
public ScreenMoveButtonPresenter( SignalBus signalBus, Button button, ScreenEnum screenEnum) { _signalBus = signalBus; _button = button; _screenEnum = screenEnum; }
void ShowGameScreen(float level) { currentScreen = ScreenEnum.Decoder; instantiateLevelAndRandomizeWord(level); Terminal.ClearScreen(); Terminal.WriteLine($"Welcome to level {stage.level} ({stage.name})"); Terminal.WriteLine($"Enter password : (hint: {currentWord.Anagram()})"); }
public void EnableScreen(ScreenEnum screen, bool enable) { foreach (EnumPanel UIscreen in UiScreens) { if (UIscreen.ScreenType == screen) { UIscreen.gameObject.SetActive(enable); } } }
public void RegisterScreen(ScreenEnum screenName, GameScreen gameScreen) { if (!_screens.ContainsKey(screenName)) { _screens.Add(screenName, gameScreen); } else { throw new Exception("Game screen is already initialized"); } }
public static bool CheckUserAction(ScreenEnum screen, ActionEnum action) { bool hasRights = false; SetupEntities db = new SetupEntities(); string userId = HttpContext.Current.User.Identity.GetUserId(); int screenId = (int)screen; int actionId = (int)action; hasRights = db.ScreenActionUsers .Any(x => x.ScreenId == screenId && x.ActionId == actionId && x.UserId == userId); return(hasRights); }
void ShowMainMenu(string name) { currentScreen = ScreenEnum.MainMenu; Terminal.ClearScreen(); Terminal.WriteLine($"Hello {name}"); Terminal.WriteLine("What would you like to decode into?"); Terminal.WriteLine(""); Terminal.WriteLine("Level 1: Wanderer world"); Terminal.WriteLine("Level 2: Alchemist's beaker"); Terminal.WriteLine("Level 3: Black Witch crystal ball"); Terminal.WriteLine(""); Terminal.WriteLine("Type your level number/'menu' to menu:"); }
public static void ShowScreen(ScreenEnum screen) { //if (!destroy) if (screens.ContainsKey(currentScreen)) { screens[currentScreen].ascreen.OnHide(); screens[currentScreen].go.SetActive(false); } //else // GameObject.Destroy(screens[currentScreen]); currentScreen = screen; screens [currentScreen].go.SetActive (true); screens [currentScreen].ascreen.OnShow (); }
public static void ShowScreen(ScreenEnum screen) { //if (!destroy) if (screens.ContainsKey(currentScreen)) { screens[currentScreen].ascreen.OnHide(); screens[currentScreen].go.SetActive(false); } //else // GameObject.Destroy(screens[currentScreen]); currentScreen = screen; screens [currentScreen].go.SetActive(true); screens [currentScreen].ascreen.OnShow(); }
public void SetActiveScreen(ScreenEnum screenName) { if (_screens.ContainsKey(screenName)) { if (_activeScreen != null) { _activeScreen.OnHide(); } _activeScreen = _screens[screenName]; _gui.Screen = _activeScreen; _activeScreen.OnShow(); } else { throw new Exception("SeaBattleGame screen not found"); } }
public void ChangeScreen(ScreenEnum screenEnum) { // Unloads the content from the current screen when switching CurrentScreen.UnloadContent(); switch (screenEnum) { case ScreenEnum.GAME: gameScreen.LoadContent(); gameScreen.SetupGame(); //TODO Handle quiting to menu then returning back to game CurrentScreen = gameScreen; break; case ScreenEnum.MENU: menuScreen.LoadContent(); CurrentScreen = menuScreen; break; case ScreenEnum.SETTING: settingScreen.LoadContent(); CurrentScreen = settingScreen; break; case ScreenEnum.MULTIPLAYER: multiplayerScreen.LoadContent(); CurrentScreen = multiplayerScreen; break; case ScreenEnum.LOGIN: loginScreen.LoadContent(); CurrentScreen = loginScreen; break; case ScreenEnum.LOBBY: lobbyScreen.LoadContent(); CurrentScreen = lobbyScreen; break; } ChangeRes(CurrentScreen.ScreenWidth, CurrentScreen.ScreenHeight, CurrentScreen.IsFullScreen); }
/// <summary> /// Checks if the current user has a certain right on certain screen /// </summary> /// <param name="screenID">The ScreenEnum that the user is trying to access</param> /// <param name="actionID">The ActionEnum that the user is trying to do</param> public CheckRights(ScreenEnum screenID, ActionEnum actionID) { ScreenID = screenID; ActionID = actionID; }
public ScreenSignal(ScreenEnum screenEnum) { Screen = (int)screenEnum; }