예제 #1
0
    /// <summary>
    /// Retrieves all the Icon Behaviors from their Categories
    /// </summary>
    void GetAllIconBehaviors()
    {
        for (int i = 0; i < categories.Length; i++)
        {
            Category currentCategory = categories[i].GetComponent <Category>();

            for (int j = 0; j < currentCategory.iconBehaviors.Count; j++)
            {
                UIIconBehavior currentBehavior = currentCategory.iconBehaviors[j];
                uIIconBehaviors.Add(currentBehavior);
            }
        }
    }
예제 #2
0
    public void SetupMenu(List <UIIconBehavior.IconFunctionality> listOfFeatures)
    {
        GetAllIconBehaviors();

        for (int i = 0; i < uIIconBehaviors.Count; i++)
        {
            uIIconBehaviors[i].SetIsActive(false);
        }

        for (int j = 0; j < uIIconBehaviors.Count; j++)
        {
            for (int i = 0; i < listOfFeatures.Count; i++)
            {
                UIIconBehavior currentIcon = uIIconBehaviors[j];
                UIIconBehavior.IconFunctionality currentFunctionality = listOfFeatures[i];
                if (currentIcon.myIconFunctionality == currentFunctionality)
                {
                    currentIcon.SetIsActive(true);
                }
            }
        }
    }