Exemple #1
0
        /// <summary>
        /// Disassociate track wheel instance from this track.
        /// </summary>
        /// <param name="wheel">Track wheel instance to remove.</param>
        /// <returns>True if removed, false if null or not associated to this track.</returns>
        public bool Remove(TrackWheel wheel)
        {
            if (wheel == null)
            {
                return(false);
            }

            return(m_wheels.Remove(wheel));
        }
Exemple #2
0
        /// <summary>
        /// Associate track wheel instance to this track.
        /// </summary>
        /// <param name="wheel">Track wheel instance to add.</param>
        /// <returns>True if added, false if null or already added.</returns>
        public bool Add(TrackWheel wheel)
        {
            if (wheel == null || m_wheels.Contains(wheel))
            {
                return(false);
            }

            m_wheels.Add(wheel);

            return(true);
        }
Exemple #3
0
 /// <summary>
 /// True if <paramref name="wheel"/> is associated to this track.
 /// </summary>
 /// <param name="wheel">Track wheel instance.</param>
 /// <returns>True if <paramref name="wheel"/> is associated to this track.</returns>
 public bool Contains(TrackWheel wheel)
 {
     return(m_wheels.Contains(wheel));
 }