/// <summary>
 /// Remove the specified event observer.
 /// </summary>
 /// <param name="observer">The observer to remove.</param>
 public abstract void RemoveObserver(IAccessoryObserver observer);
Example #2
0
 public sealed override void RemoveObserver(IAccessoryObserver observer)
 {
     m_Observers.Remove(observer);
 }
        ////////////////////////////////////////////////////////////////////////////////////////////

        #endregion

        #region Observers

        /// <summary>
        /// Add the specified event observer.
        /// </summary>
        /// <remarks>
        /// <para>
        /// An observer can only be added once and it must be implmented by a UnityEngine.Object for serialization
        /// puposes.
        /// </para>
        /// </remarks>
        /// <param name="observer">The observer to add. (Required)</param>
        /// <returns>
        /// True if the observer was accepted or already added, or false if the observer is not implemented by
        /// a UnityEngine.Object.
        /// </returns>
        public abstract bool AddObserver(IAccessoryObserver observer);
Example #4
0
        private AccessoryObserverGroup m_Observers = new AccessoryObserverGroup(0);   // Required by custom editor. <<<<

        public sealed override bool AddObserver(IAccessoryObserver observer)
        {
            return(m_Observers.Add(observer, this) != -1);
        }