// Start is called before the first frame update void Start() { gameManager = FindObjectOfType <GameManager>(); gameSpeedController = FindObjectOfType <GameSpeedController>(); switch (teamBlack.GetTeam()) { case TeamName.BlackTeam: teamAStats = ScoreKeeper.GetBlackTeamStats(); teamBStats = ScoreKeeper.GetRedTeamStats(); break; case TeamName.RedTeam: teamAStats = ScoreKeeper.GetRedTeamStats(); teamBStats = ScoreKeeper.GetBlackTeamStats(); break; } teamAStats = ScoreKeeper.GetBlackTeamStats(); teamBStats = ScoreKeeper.GetRedTeamStats(); gameSpeedController.speed = testSpeed; StartNewTest(); }
// Start is called before the first frame update void Start() { gameManager = FindObjectOfType <GameManager>(); gameSpeedController = FindObjectOfType <GameSpeedController>(); switch (teamBlack.GetTeam()) { case TeamName.BlackTeam: teamAStats = ScoreKeeper.GetBlackTeamStats(); teamBStats = ScoreKeeper.GetRedTeamStats(); break; case TeamName.RedTeam: teamAStats = ScoreKeeper.GetRedTeamStats(); teamBStats = ScoreKeeper.GetBlackTeamStats(); break; } teamAStats = ScoreKeeper.GetBlackTeamStats(); teamBStats = ScoreKeeper.GetRedTeamStats(); //The gameSpeedController no longer uses this property. I am not hooking this up because AIs are no longer under development //gameSpeedController.speed = testSpeed; StartNewTest(); }
void GetResults() { var teamAResult = teamAStats.WinCount; var teamBResult = teamBStats.WinCount; var results = new List <int> { teamAResult, teamBResult }; results.Sort(); var resultString = teamAResult > teamBResult ? teamBlack._myName + " (" + teamBlack.GetTeam() + ")" : teamRed._myName + " (" + teamRed.GetTeam() + ")"; var percentBetter = (Mathf.Round((float)(results[1] - results[0]) / results[0] * 100)); Debug.Log(testCount + 1 + " rounds completed"); Debug.Log(resultString + " won the test " + results[1] + "/" + results[0] + ", performing " + percentBetter + "% better."); }