public static GetGame ( string gameName, Level l ) : |
||
gameName | string | |
l | Level | |
return |
private void InitializeGame(Player p, string[] param) { if (p.level == null) { p.SendMessage("Error, can't use /gamemaster via console."); return; } else { // param[0] - name of game if (GameControl.availableGames.Contains(param[0])) { if (GameControl.IsEnabled(p.level)) { p.SendMessage("Error, game " + GameControl.FindGame(p.level).name + " already initialized."); return; } else { GameControl.Add(GameControl.GetGame(param[0], p.level)); p.level.ChatLevel("Game " + param[0] + " initialized."); } } else { p.SendMessage("Error, game name " + param[0] + " is invalid."); return; } } }
private void GetHelp(Player p, string[] param) { if (GameControl.availableGames.Contains(param[1])) { string[] help = GameControl.GetGame(param[1], nullLevel).GetHelp(); for (int i = 0; i < help.Length; i++) { p.SendMessage(help[i]); } } else { p.SendMessage("Error, invalid game name."); } }