示例#1
0
    //CATEGORY CONTROLLER
    public void updateOptions(string section)
    {
        Debug.Log("update thumb options to " + section);
        activeSection = section;

        hideAllSections();
        disableAllOptionButtons();

        ToogleButton optionButton = null;

        if (section == AvatarCategoryStrings.BODY)
        {
            bodyOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.bodyItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.EYE)
        {
            eyesOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.eyeItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.HAIR)
        {
            hairOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.hairItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.MOUTH)
        {
            mouthOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.mouthItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.ACC)
        {
            accOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.accItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.SHIRT)
        {
            shirtOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.shirtItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.PANTS)
        {
            pantsOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.pantsItem).GetComponent <ToogleButton> ();
        }
        else if (section == AvatarCategoryStrings.SHOE)
        {
            shoeOptions.SetActive(true);
            optionButton = GameObject.Find("option" + avatarController.showItem).GetComponent <ToogleButton> ();
        }

        if (optionButton != null)
        {
            optionButton.EnableMenuButton();
        }
    }
示例#2
0
    public void updateMenu()
    {
        GameSound.gameSound.PlaySFX("button");
        ////disable all butons and load category
        GameObject           menu           = GameObject.Find("menu");
        AvatarMenuController menuController = menu.GetComponent(typeof(AvatarMenuController)) as AvatarMenuController;

        menuController.disableAllButtons(gameObject.name);

        //enable this button
        ToogleButton button = gameObject.GetComponent <ToogleButton>();

        button.EnableMenuButton();
    }
示例#3
0
    public void updateOption()
    {
        GameObject options = GameObject.Find("options");
        AvatarOptionsController optionsController = options.GetComponent(typeof(AvatarOptionsController)) as AvatarOptionsController;

        optionsController.disableAllOptionButtons();
        optionsController.loadItemAtIndex(itemIndex);

        //enable this button
        GameSound.gameSound.PlaySFX("button");
        ToogleButton button = gameObject.GetComponent <ToogleButton>();

        button.EnableMenuButton();
    }