Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (!TeamName1.GetComponent <Text>().text.Equals(oldName1))
        {
            oldName1 = TeamName1.GetComponent <Text>().text;
            TeamElo1.GetComponent <Text>().text  = "" + TeamsPerformance.GetTeamElo(oldName1);
            TeamElo1.GetComponent <Text>().color = ColorElo(TeamsPerformance.GetTeamElo(oldName1));
        }

        if (!TeamName2.GetComponent <Text>().text.Equals(oldName2))
        {
            oldName2 = TeamName2.GetComponent <Text>().text;
            TeamElo2.GetComponent <Text>().text  = "" + TeamsPerformance.GetTeamElo(oldName2);
            TeamElo2.GetComponent <Text>().color = ColorElo(TeamsPerformance.GetTeamElo(oldName2));
        }

        if (!TeamName3.GetComponent <Text>().text.Equals(oldName3))
        {
            oldName3 = TeamName3.GetComponent <Text>().text;
            TeamElo3.GetComponent <Text>().text  = "" + TeamsPerformance.GetTeamElo(oldName3);
            TeamElo3.GetComponent <Text>().color = ColorElo(TeamsPerformance.GetTeamElo(oldName3));
        }

        if (!TeamName4.GetComponent <Text>().text.Equals(oldName4))
        {
            oldName4 = TeamName4.GetComponent <Text>().text;
            TeamElo4.GetComponent <Text>().text  = "" + TeamsPerformance.GetTeamElo(oldName4);
            TeamElo4.GetComponent <Text>().color = ColorElo(TeamsPerformance.GetTeamElo(oldName4));
        }
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     oldName1 = TeamName1.GetComponent <Text>().text;
     oldName2 = TeamName2.GetComponent <Text>().text;
     oldName3 = TeamName3.GetComponent <Text>().text;
     oldName4 = TeamName4.GetComponent <Text>().text;
     t        = new TeamsPerformance();
     TeamElo1.GetComponent <Text>().text = "" + TeamsPerformance.GetTeamElo(oldName1);
     TeamElo2.GetComponent <Text>().text = "" + TeamsPerformance.GetTeamElo(oldName2);
     TeamElo3.GetComponent <Text>().text = "" + TeamsPerformance.GetTeamElo(oldName3);
     TeamElo4.GetComponent <Text>().text = "" + TeamsPerformance.GetTeamElo(oldName4);
 }