/// <summary> /// One team has successfully captured the active point. /// </summary> /// <param name="teamColor">Color of the team that captured the point.</param> public void PointCaptured(TeamColor teamColor) { StartCoroutine(ui.DisplayCaptured()); switch (teamColor) { case (TeamColor.RED): capturePoint.AdvanceRed(); red.Advance(); blue.Advance(); break; case (TeamColor.BLUE): capturePoint.AdvanceBlue(); blue.Retreat(); red.Retreat(); break; } StopCoroutine(ai.RespawnWaves()); ai.RespawnAI(); ai.RerouteAI(); StopCoroutine(player.WaitForRespawn()); player.Respawn(); }