Exemple #1
0
 /// <summary>
 /// Get the slot value from a given node.
 /// </summary>
 /// <param name="node">The node that the slot belongs to.</param>
 /// <returns>The current value of the slot.</returns>
 public T this[AbstractNode node]
 {
     get
     {
         var newValue = node.GetSlotValue <T>(m_Slot);
         if (!EqualityComparer <T> .Default.Equals(newValue, m_OldValue))
         {
             m_OldValue = newValue;
             if (m_ChangeListener != null)
             {
                 m_ChangeListener.Invoke();
             }
         }
         return(newValue);
     }
 }
 public T this[AbstractNode slot] => slot.GetSlotValue <T>(this);