PlayerGUI.updateColors C# (CSharp) Method

updateColors() public method

public updateColors ( bool activated, List Owners = null ) : void
activated bool
Owners List
return void
    public void updateColors(bool activated, List<int> Owners = null)
    {
        // set crosshair GUI to correct colors
        if (activated)
        {
            //sorting Owners list
            Owners.Sort();

            for (int i = 0; i < crosshairSections.Count; i++)
            {
                //Debug.Log(Owners[0] + ", " +Owners[1] + ", " +Owners[2] + ", " +Owners[3] + ", " +Owners[4] + ", " +Owners[5]);

                switch (Owners[i])
                {
                    case -1:
                        crosshairSections[i].color = clear;
                        break;
                    default:
                        crosshairSections[i].color = gameColors[Owners[i]];
                        break;
                }
            }
        }
        else
        {
            foreach (GUITexture i in crosshairSections)
            {
                i.color = deactivated;
            }
        }
    }