示例#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;
 }
示例#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;
 }
示例#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);
        }