Exemplo n.º 1
0
    private static void DrawRoundData()
    {
        Rect position = new Rect(ScoreBoard.rTeamBack[0].x, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(240f), GUI2.YRES(20f));
        Rect rect     = new Rect(ScoreBoard.rTeamBack[0].x, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(32f), GUI2.YRES(20f));

        GUI.DrawTexture(position, ScoreBoard.tGray0);
        GUI.DrawTexture(rect, ScoreBoard.tGray2);
        GUI2.DrawTextRes(rect, ScoreBoard.sTeamScore[0], TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
        for (int i = 0; i < 10; i++)
        {
            if (i < ScoreBoard.teamscore[0])
            {
                GUI.color = GUI2.GetColor(_Color.Red);
            }
            else
            {
                GUI.color = Color.gray;
            }
            GUI.DrawTexture(new Rect(rect.x + GUI2.YRES(26f) + GUI2.YRES(20f) * (float)i, rect.y, GUI2.YRES(40f), GUI2.YRES(20f)), ScoreBoard.tLine);
            GUI.color = Color.white;
        }
        Rect position2 = new Rect(ScoreBoard.rTeamBack[0].x + GUI2.YRES(240f) + GUI2.YRES(4f) * 2f, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(240f), GUI2.YRES(20f));
        Rect rect2     = new Rect(ScoreBoard.rTeamBack[0].x + GUI2.YRES(240f) + GUI2.YRES(4f) * 2f, ScoreBoard.rTeamBack[0].y - GUI2.YRES(20f) - GUI2.YRES(4f), GUI2.YRES(32f), GUI2.YRES(20f));

        GUI.DrawTexture(position2, ScoreBoard.tGray0);
        GUI.DrawTexture(rect2, ScoreBoard.tGray2);
        GUI2.DrawTextRes(rect2, ScoreBoard.sTeamScore[1], TextAnchor.MiddleCenter, _Color.White, 0, 12, true);
        for (int j = 0; j < 10; j++)
        {
            if (j < ScoreBoard.teamscore[1])
            {
                GUI.color = GUI2.GetColor(_Color.Blue);
            }
            else
            {
                GUI.color = Color.gray;
            }
            GUI.DrawTexture(new Rect(rect2.x + GUI2.YRES(26f) + GUI2.YRES(20f) * (float)j, rect2.y, GUI2.YRES(40f), GUI2.YRES(20f)), ScoreBoard.tLine);
            GUI.color = Color.white;
        }
    }