public void SetUp(TradeUIController tradeUIController)
        {
            this.tradeUIController = tradeUIController;

            SetCurrentPaneIndex(0);

            SetPokemon(null);

            foreach (PokemonDetailsPaneIndexButtonController btn in paneIndexButtons)
            {
                btn.SetUp(this);
            }
        }
Пример #2
0
        public void SetUp(TradeUIController tradeUIController,
                          PlayerData player = null)
        {
            if (player == null)
            {
                player = PlayerData.singleton;
            }

            this.player = player;

            this.tradeUIController = tradeUIController;

            showingBoxes = false;
            boxIndex     = 0;

            if (partyBoxesSwitchButton.GetComponent <MenuSelectableController>() == null)
            {
                Debug.LogError("No MenuSelectableController on party/boxes switch button");
            }

            if (prevBoxButton.GetComponent <MenuSelectableController>() == null)
            {
                Debug.LogError("No MenuSelectableController on previous box button");
            }

            if (nextBoxButton.GetComponent <MenuSelectableController>() == null)
            {
                Debug.LogError("No MenuSelectableController on next box button");
            }

            prevBoxButton.onClick.RemoveAllListeners();
            prevBoxButton.onClick.AddListener(PrevBox);

            nextBoxButton.onClick.RemoveAllListeners();
            nextBoxButton.onClick.AddListener(NextBox);

            partyBoxesSwitchButton.onClick.RemoveAllListeners();
            partyBoxesSwitchButton.onClick.AddListener(SwapListViews);

            partyView.SetUp(this);
            boxView.SetUp(this);

            RefreshAll();
        }