private void LoadBuildMenuItem(IBuildItemBlueprint buildItemBlueprint)
    {
        GameObject item = Instantiate(BuildItemPrefab, BuildItemsContainer.transform);

        item.name = name;
        BuildItemTile buildItemTile = item.GetComponent <BuildItemTile>();

        buildItemTile.Setup(buildItemBlueprint);
    }
Exemplo n.º 2
0
    public void Setup(IBuildItemBlueprint buildItemBlueprint)
    {
        BuildItemBlueprint = buildItemBlueprint;

        Guard.CheckIsNull(NameTextComponent, "NameTextComponent");
        Guard.CheckIsNull(DescriptionTextComponent, "DescriptionTextComponent");

        NameTextComponent.text        = BuildItemBlueprint.Name;
        DescriptionTextComponent.text = BuildItemBlueprint.Description;
    }