public void BuildShipHullDataButtons(List <ShipHullData> shipHullDatas, ShipHullDataButton.ButtonPress ChangeModuleSet)
    {
        Clear();
        selectedButton = null;

        foreach (ShipHullData hullData in shipHullDatas)
        {
            GameObject         buttonObject = InstantiateEntry(hullData.Name);
            ShipHullDataButton newButton    = buttonObject.GetComponent <ShipHullDataButton>();
            newButton.SetShipHullData(hullData, ChangeModuleSet, SetSetSelectionChange);

            if (selectedButton == null)
            {
                selectedButton = newButton;
                selectedButton.SetHighlight(true);
                ChangeModuleSet(hullData);
            }
        }
    }
Exemplo n.º 2
0
 public void SetShipHullDatas(List <ShipHullData> shipHullDatas, ShipHullDataButton.ButtonPress buttonPress)
 {
     shipHullDataScrollList.BuildShipHullDataButtons(shipHullDatas, buttonPress);
 }