Exemple #1
0
        public static void ProcessExtinctionIfNeeded(string teamName)
        {
            if (!TeamIsExtinct(teamName))
            {
                return;
            }

            LogUtility.LogInfoFormat("{0} is extinct", teamName);

            lock (CommonHelperMethods.GlobalStateLock)
            {
                // Refresh everyone's DNA
                GenePoolManager.RefreshTeamDNA();
            }
        }
Exemple #2
0
        // Use this for initialization
        public TeamManager(Material teamMaterial)
        {
            this.TeamMaterial = teamMaterial;
            this.TeamName     = teamMaterial.name;

            if (activeTeamDic.ContainsKey(this.TeamName))
            {
                LogUtility.LogErrorFormat(
                    "Created more than one team with name: {0}",
                    this.TeamName);
            }
            else
            {
                activeTeamDic.Add(this.TeamName, this);
            }

            GenePoolManager.RegisterTeam(this.TeamName);
        }