public static void UpdateGameStatusBanner(string message, IemGameBase.IemGame game) { foreach (IemGameBase.IemPlayer iemPlayer in game.Players.Values) { BasePlayer player = IemUtils.FindPlayerByID(iemPlayer.PlayerId); IemUI.CreateGameStatusBanner(player, message); } }
public static void ShowInGameMenu(BasePlayer player, IemGameBase.IemGame game) { //var gm = game. var buttons = new List <BaseButton>() { }; buttons.Add(new BaseButton() { Text = "Quit Game", Command = "iem.menu quit_game " + game.Name }); var elements = new List <BaseElement>() { }; elements.Add(new BaseElement() { type = ElementType.OutlineText, Text = $"You are currently playing <color=red>{game.Name}</color>", xmin = 0.05f, xmax = 0.75f, ymin = 0.75f, ymax = 0.95f }); string message = $"Level is {game.difficultyLevel} \nStarted at XX:XX\n\n You can quit this " + "game and return to the map with the button on the left"; elements.Add(new BaseElement() { type = ElementType.Label, Text = message, xmin = 0.1f, xmax = 0.75f, ymin = 0.15f, ymax = 0.75f }); ShowLeftButtonPanel(player, buttons, "in_game_menu_left"); ShowMainContentPanel(player, elements, "in_game_menu_main"); playerkeys[player.UserIDString].showingInGameMenu = true; }
void OnGameEnded(IemGameBase.IemGame endedGame) { IemUtils.GLog("Hook called to indicate game ended"); }