private void SetUpAndShowGridButtonsForSpawnerSelectionView(Spawner selected, UISelectionMenuManager caller)
    {
        for (int i = 0; i < STATIC_PANEL_SPACES; i++)
        {
            AIUnitData spawnerSpawnOption = selected.spawnOptions[i];
            if (spawnerSpawnOption == null)
            {
                continue;
            }


            Debug.Assert(caller.portraitDictionary.dictionary.TryGetValue(spawnerSpawnOption, out Sprite sprite),
                         $"portrait dictionary doesn't have a value for {spawnerSpawnOption}");

            gridButtons[i].SetUpButtonForSpawner(selected, spawnerSpawnOption, sprite);
            gridButtons[i].gameObject.SetActive(true);
        }
    }
示例#2
0
 private void Start()
 {
     selectionMenuManager = GetComponent <UISelectionMenuManager>();
     //InitAgentPanels();
 }
 private void Start()
 {
     selectionMenuManager = GetComponent <UISelectionMenuManager>();
     //SetUpCreationAndReinforcementButtons();
 }
 public void UpdateSelection(Builder selected, UISelectionMenuManager caller)
 {
 }
 public void UpdateSelection(Spawner selected, UISelectionMenuManager caller)
 {
 }
 public void UpdateSelection(AIUnit selected, UISelectionMenuManager caller)
 {
 }
 public void NewSelection(Spawner selected, UISelectionMenuManager caller)
 {
     HideAllContent();
     //ResetAllButtons();
     SetUpAndShowGridButtonsForSpawnerSelectionView(selected, caller);
 }