Exemple #1
0
        public virtual void SetUp(BagMenuController menuController,
                                  GameObject borderPrefab)
        {
            this.menuController = menuController;
            this.borderPrefab   = borderPrefab;

            TryDestroyBorder();
        }
Exemple #2
0
        public void SetUp(BagMenuController bagMenuController)
        {
            this.bagMenuController = bagMenuController;

            if (pokemonButtons.Length != 6)
            {
                Debug.LogError("Non-6 number of pokemon buttons provided");
            }

            SetUpListeners();
        }
        public override void SetUp(BagMenuController menuController, GameObject borderPrefab)
        {
            base.SetUp(menuController, borderPrefab);

            for (int i = 0; i < actionIcons.Length; i++)
            {
                if (actionIcons[i].GetComponent <Button>() == null)
                {
                    Debug.LogError("Action icon index " + i.ToString() + " has no Button component");
                    continue;
                }

                int iconIndex = i;
                actionIcons[i].GetComponent <Button>().onClick.AddListener(() => menuController.OnActionChosen(iconIndex));
            }
        }