public override bool Remove(IUIBaseObject element)
        {
            var res = base.Remove(element);

            if (res)
            {
                ((StatBaseModifierTemplateUI)element).FunctionChanged -= StatBaseModifierListUI_FunctionChanged;
            }

            return(res);
        }
Пример #2
0
 public virtual bool Add(IUIBaseObject element)
 {
     if (_elements.Add(element))
     {
         element.DeleteRequested += Item_DeleteRequested;
         element.Selected        += Element_Selected;
         SceneDataManager.instance.Add(element.BaseObject);
         return(true);
     }
     return(false);
 }
Пример #3
0
 public virtual bool Remove(IUIBaseObject element)
 {
     if (_elements.Remove(element))
     {
         element.DeleteRequested -= Item_DeleteRequested;
         SceneDataManager.instance.Remove(element.Id);
         Destroy(element.gameObject);
         return(true);
     }
     return(false);
 }
Пример #4
0
    private void Start()
    {
        AddButton.Clicked  += AddButton_Clicked;
        SaveButton.Clicked += SaveButton_Clicked;
        LoadButton.Clicked += LoadButton_Clicked;

        FilterInput.ValueChanged += FilterInput_ValueChanged;

        _prefab = Prefab.GetComponent <IUIBaseObject>();
        _prefab.CreateNewObject();
        _objectType = _prefab.BaseObject.Type;
    }
Пример #5
0
 public bool Equals(IUIBaseObject other)
 {
     return(other != null && other.GetHashCode() == GetHashCode());
 }
Пример #6
0
 protected virtual void Element_Selected(object sender)
 {
     SelectedElement = sender as IUIBaseObject;
 }