Exemple #1
0
 private void AddEventPickUpItem()
 {
     if (navigator == null)
     {
         navigator = UI_NavigatorManager.Instance.Add(item.ItemName, InputEvent.ACTION_PICK_UP_ITEM);
         InputEvent.Instance.Event_PickUpItem.AddListener(PickUpItem, GetInstanceID());
     }
 }
Exemple #2
0
        public void Add(ref UI_Navigator nav, string text, string letter)
        {
            if (navigatorPool.Count == 0)
            {
                navigatorPool.Push(Instantiate(prefab, poolTransform));
            }

            nav = navigatorPool.Pop();
            nav.SetValue(text, letter);

            nav.transform.SetParent(transform);
            Reposition();
        }
Exemple #3
0
        public void Remove(ref UI_Navigator navigator)
        {
            if (navigator == null)
            {
                return;
            }

            navigator.transform.SetParent(poolTransform);
            navigatorPool.Push(navigator);
            Reposition();

            navigator = null;
        }