Exemplo n.º 1
0
 private Rider(SimulationPoint[] body, SimulationPoint[] scarf, RectLRTB physbounds, bool dead, bool sledbroken)
 {
     Body          = new ImmutablePointCollection(body);
     Scarf         = new ImmutablePointCollection(scarf);
     Crashed       = dead;
     SledBroken    = sledbroken;
     PhysicsBounds = physbounds;
 }
Exemplo n.º 2
0
 private Rider(SimulationPoint[] body, SimulationPoint[] scarf, RectLRTB physbounds, bool dead, bool sledbroken, bool useRemount, int rState = 0, int rTimer = 0)
 {
     Body          = new ImmutablePointCollection(body);
     Scarf         = new ImmutablePointCollection(scarf);
     Crashed       = dead;
     SledBroken    = sledbroken;
     PhysicsBounds = physbounds;
     UseRemount    = useRemount;
     remountState  = rState;
     remountTimer  = rTimer;
 }
Exemplo n.º 3
0
        /// <summary>
        /// fast compare method for two collections so we can bypass
        /// struct copies
        /// </summary>
        public bool CompareTo(ImmutablePointCollection comparand)
        {
            int len = _points.Length;

            if (comparand.Length != len)
            {
                throw new ArgumentException("Mismatched point collections");
            }
            for (int i = 0; i < len; i++)
            {
                if (!SimulationPoint.FastEquals(
                        ref _points[i],
                        ref comparand._points[i]))
                {
                    return(false);
                }
            }
            return(true);
        }