Пример #1
0
        public void Init(MenuData data, Action clickCb)
        {
            _menuData       = data;
            _onClickHandler = clickCb;

            transform.Reset();
        }
Пример #2
0
        protected virtual void HelperConstruct(MenuData data, out MenuHelper helper)
        {
            helper = new MenuHelper();

            helper.Data                = data;
            helper.OnEnableCallback    = _helper.OnEnableCallback;
            helper.OnMenuChangeHandler = OnSubMenuChange;
            helper.InteractType        = _helper.InteractType;
        }
Пример #3
0
        public void AddChild(int dataId)
        {
            if (ChildsMap == null)
            {
                ChildsMap = new Dictionary <int, MenuData>();
            }

            if (!ChildsMap.ContainsKey(dataId))
            {
                var child = new MenuData(dataId);
                ChildsMap.Add(dataId, child);
            }
        }