Beispiel #1
0
    public void FillFactory(ClickableTile.factoryType factoryType)
    {
        List <Unit> catalogToShow = new List <Unit>();

        switch (factoryType)
        {
        case ClickableTile.factoryType.LAND:
            catalogToShow = COIdentity.landUnitCatalog;
            break;

        case ClickableTile.factoryType.AIR:
            catalogToShow = COIdentity.airUnitCatalog;
            break;

        case ClickableTile.factoryType.SEA:
            catalogToShow = COIdentity.seaUnitCatalog;
            break;

        default:
            Debug.Log("ERROR: Non-factory tile recognized as factory.");
            break;
        }

        for (int i = 0; i < catalogToShow.Count; i++)
        {
            FactoryMenu.instance.FillOption(i, catalogToShow[i]);
        }
    }
 public void ActivateFactoryMenu(ClickableTile.factoryType factoryType)
 {
     currentOption = 0;
     activeButtons.Clear();
     foreach (FactoryMenuOption button in allButtons)
     {
         button.gameObject.SetActive(false);
     }
     GameManager.instance.activePlayer.FillFactory(factoryType);
     activeButtons[currentOption].GetComponent <Image>().color = Color.yellow;
     menu.SetActive(true);
     GameManager.gameState = GameManager.state.NAVIGATING_FACTORY_MENU;
 }