Ejemplo n.º 1
0
        /// <summary>
        /// Checks if two objects are equal.
        /// </summary>
        /// <param name="obj">The object to check against.</param>
        /// <returns>Returns true if they are equal, otherwise false.</returns>
        public override bool Equals(object obj)
        {
            ArbiterKey other = (ArbiterKey)obj;

            return(other.body1.Equals(body1) && other.body2.Equals(body2) ||
                   other.body1.Equals(body2) && other.body2.Equals(body1));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the ArbiterMap class.
        /// </summary>
        public ArbiterMap()
        {
            lookUpKey = new ArbiterKey(null, null);

            arbiterKeyComparer = new ArbiterKeyComparer();
            dictionary         = new Dictionary <ArbiterKey, Arbiter>(2048, arbiterKeyComparer);
        }
Ejemplo n.º 3
0
 internal void Add(ArbiterKey key, Arbiter arbiter)
 {
     dictionary.Add(key, arbiter);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the ArbiterMap class.
 /// </summary>
 public ArbiterMap()
 {
     lookUpKey = new ArbiterKey(null, null);
 }