public MatchStatsScreen(MatchStartData matchData, FrontEndConstants consts, ScreenUI owner) : base(matchData, consts, owner) { LevelManager manager = WorldConstants.MatchController.GetComponent <LevelManager>(); players = WorldConstants.ColTracker.Actors; statsToDisplay = Stats.GetStats(manager.MatchRules, players); }
public LobbyMenuScreen(MatchStartData matchStartData, FrontEndConstants consts, ScreenUI owner) : base(matchStartData, consts, owner) { for (int i = 0; i < Owner.ControlsTextures.Length; ++i) { controlContents[i] = new GUIContent(Owner.ControlsTextures[i]); } playerDatas[0] = new PlayerData(0); playerDatas[1] = new PlayerData(1); playerDatas[2] = null; playerDatas[3] = null; }
public GenerateLevelMenuScreen(MatchStartData matchStartData, FrontEndConstants consts, ScreenUI owner) : base(matchStartData, consts, owner) { MatchData.GenerateLevelAndSpawns(); regenerate = true; }
public MenuScreen(MatchStartData matchStartData, FrontEndConstants consts, ScreenUI owner) { MatchData = matchStartData; Consts = consts; Owner = owner; }
void Awake() { data = GetComponent <MinimapCameraData>(); consts = WorldConstants.ConstantsOwner.GetComponent <CameraConstants>(); uiConsts = WorldConstants.ConstantsOwner.GetComponent <FrontEndConstants>(); }
public MainMenuScreen(MatchStartData matchData, FrontEndConstants consts, ScreenUI owner) : base(matchData, consts, owner) { }
public CreditsScreen(ScreenUI owner, MatchStartData msd, FrontEndConstants consts) : base(msd, consts, owner) { }
public CreateMatchMenuScreen(MatchStartData matchStartData, FrontEndConstants consts, ScreenUI owner) : base(matchStartData, consts, owner) { //Initialize data. //Debug.Log("Reading matches:"); XmlDocument matchDoc = new XmlDocument(); matchDoc.LoadXml(Owner.MatchesFile.text); //matchDoc.LoadXml(Owner.MatchesFile.text.Substring(1, Owner.MatchesFile.text.Length - 1)); matchSettings = new MatchSettingsReadWrite(matchDoc); //Debug.Log("Read matches"); //Debug.Log("Reading levels:"); XmlDocument levelsDoc = new XmlDocument(); levelsDoc.LoadXml(Owner.LevelsFile.text); //levelsDoc.LoadXml(Owner.LevelsFile.text.Substring(1, Owner.LevelsFile.text.Length - 1)); levelGeneration = new LevelGenerationReadWrite(levelsDoc); //Debug.Log("Read levels"); selectedMatch = "Unreadable"; selectedLevelGen = "Unreadable"; selectedMatchIndex = 0; selectedLevelGenIndex = 0; //Read matches. if (matchSettings.ErrorMessage == "") { matches = new GUIContent[matchSettings.Matches.Count()]; matchSets = new Rules[matches.Length]; int count = 0; foreach (string rulesN in matchSettings.Matches) { matchSets[count] = matchSettings.ReadMatch(rulesN); if (matchSettings.ErrorMessage != "") { matches = null; matchSets = null; break; } matches[count] = new GUIContent(rulesN, matchSets[count].Description); count += 1; } selectedMatchIndex = Search(Convert(matches, m => m.text), "Brawl", (s1, s2) => s1 == s2); selectedMatch = matches[selectedMatchIndex].text; MatchData.MatchSettings = matchSets[selectedMatchIndex]; } else { matches = null; matchSets = null; } //Read levels. if (levelGeneration.ErrorMessage == "") { levels = new GUIContent[levelGeneration.Levels.Count()]; levelGens = new Generator[levels.Length]; int count = 0; foreach (string levelN in levelGeneration.Levels) { levelGens[count] = levelGeneration.ReadGenerator(levelN); if (levelGeneration.ErrorMessage != "") { levels = null; levelGens = null; break; } levels[count] = new GUIContent(levelN, levelGens[count].Description); count += 1; } selectedLevelGenIndex = Search(Convert(levels, l => l.text), "Corridor", (s1, s2) => s1 == s2); selectedLevelGen = levels[selectedLevelGenIndex].text; MatchData.GeneratedLevel = levelGens[selectedLevelGenIndex]; MatchData.GenerateLevelAndSpawns(); } else { levels = null; levelGens = null; } }
public MatchScreen(MatchStartData matchData, FrontEndConstants consts, ScreenUI owner) : base(matchData, consts, owner) { manager = WorldConstants.Creator.CreateMatchController().GetComponent <LevelManager>(); }
public MatchEndScreen(MatchStartData matchData, FrontEndConstants consts, ScreenUI owner) : base(matchData, consts, owner) { elapsed = 0.0f; WorldConstants.MatchController.GetComponent <InputManager>().DisableInput = true; }