Beispiel #1
0
 private void CatalogInit()
 {
     _groupsController.GroupSelectedEvent += groupId =>
     {
         _itemsController.ActivateContainer(groupId);
         _itemsTabControl.ActivateStoreTab();
     };
     UserCatalog.Instance.UpdateItems(InitStoreUi);
 }
Beispiel #2
0
    void AddGroup(GameObject groupPref, string groupId, string groupName)
    {
        if (_groups.Exists(group => group.Id == groupId))
        {
            return;
        }
        var newGroup = Instantiate(groupPref, scrollView.transform).GetComponent <IGroup>();

        newGroup.Id            = groupId;
        newGroup.Name          = groupName;
        newGroup.OnGroupClick += (id) =>
        {
            _itemsController.ActivateContainer(id);
            ChangeSelection(id);

            _itemsTabControl.ActivateStoreTab(id);
        };

        _groups.Add(newGroup);
    }