Example #1
0
    public void Setup()
    {
        options           = GameObject.Find("options");
        optionsController = options.GetComponent <AvatarOptionsController> ();

        GameObject           go = GameObject.Find("body");
        AvatarCategoryButton cb = go.GetComponent <AvatarCategoryButton> ();

        cb.updateMenu();
    }
Example #2
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();
    }