示例#1
0
    /// <summary>
    /// crea gli oggetti selezionabili.
    /// </summary>
    /// <param name="_item"></param>
    protected override void CreateMenuItem(ISelectable _item)
    {
        GameObject         newGO   = Instantiate(ButtonPrefab, MenuItemsContainer);
        SelectableMenuItem newItem = newGO.GetComponent <SelectableMenuItem>();

        newItem.SetData(_item);
    }
示例#2
0
    /// <summary>
    /// Crea un nuovo MenuItem per i button
    /// </summary>
    /// <param name="_item"></param>
    protected virtual void CreateMenuItem(ISelectable _item)
    {
        GameObject         newGO     = Instantiate(ButtonPrefab, MenuItemsContainer);
        SelectableMenuItem newButton = newGO.GetComponent <SelectableMenuItem>();

        newButton.SetData(_item);
        //newButton.onClick.AddListener(() => this.AddSelection(newButton.SelectionData));
    }