コード例 #1
0
ファイル: Track.cs プロジェクト: Algoryx/AGXUnity
        /// <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));
        }
コード例 #2
0
ファイル: Track.cs プロジェクト: Algoryx/AGXUnity
        /// <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);
        }
コード例 #3
0
ファイル: Track.cs プロジェクト: Algoryx/AGXUnity
 /// <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));
 }