Exemplo n.º 1
0
        public override void UpdateButton(ButtonController button)
        {
            GroupData         groupData         = groupsDataInitializer.Data.Groups[button.Id];
            GroupProgressData groupProgressData = progressController.GetGroupData(button.Id);

            GroupButtonController buttonController = button.GetComponent <GroupButtonController>();

            buttonController.Init(button.Id, themeController.GetCurrentTheme(), groupData, groupProgressData);
        }
Exemplo n.º 2
0
        public override ButtonController[] CreateButtons(int parentId)
        {
            int size = groupsDataInitializer.Data.Groups.Length;

            ButtonController[] result = new ButtonController[size];

            for (int i = 0; i < size; i++)
            {
                GameObject instance = CreateButton();

                GroupData         groupData    = groupsDataInitializer.Data.Groups[i];
                GroupProgressData progressData = progressController.GetGroupData(i);

                GroupButtonController buttonController = instance.GetComponent <GroupButtonController>();
                buttonController.Init(i, themeController.GetCurrentTheme(), groupData, progressData);
                result[i] = buttonController;
            }

            return(result);
        }