Example #1
0
    public HUDControl GetChildControlByName(HUDControlName _ctrlName)
    {
        HUDControlName ctrlName = _ctrlName;

        for (int i = 0; i < hudControls.Length; i++)
        {
            if (hudControls[i].controlName == ctrlName)
            {
                return(hudControls[i]);
            }
        }

        Debug.LogError("HUD control: '" + ctrlName + "' not founded in HUD group: '" + this + "'.");
        return(null);
    }
Example #2
0
    public HUDControl GetControlInGroup(HUDGroupName _groupName, HUDControlName _controlName)
    {
        HUDGroup hg = GetChildGroupByName(_groupName);

        return(hg.GetChildControlByName(_controlName));
    }