예제 #1
0
        public bool Equals(CarGenerator other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Model.Equals(other.Model) &&
                   Position.Equals(other.Position) &&
                   Heading.Equals(other.Heading) &&
                   Color1.Equals(other.Color1) &&
                   Color2.Equals(other.Color2) &&
                   ForceSpawn.Equals(other.ForceSpawn) &&
                   AlarmChance.Equals(other.AlarmChance) &&
                   LockedChance.Equals(other.LockedChance) &&
                   MinDelay.Equals(other.MinDelay) &&
                   MaxDelay.Equals(other.MaxDelay) &&
                   Timer.Equals(other.Timer) &&
                   Handle.Equals(other.Handle) &&
                   Enabled.Equals(other.Enabled) &&
                   IsBlocking.Equals(other.IsBlocking) &&
                   CollisionBoundingMin.Equals(other.CollisionBoundingMin) &&
                   CollisionBoundingMax.Equals(other.CollisionBoundingMax) &&
                   CollisionSize.Equals(other.CollisionSize));
        }
예제 #2
0
        //arguments: server_id host port min_delay max_delay version
        public string CollapseArguments()
        {
            string[] args =
            {
                ServerId,
                Host,
                Port.ToString(),
                MinDelay.ToString(),
                MaxDelay.ToString(),
                Version.ToString()
            };

            return(string.Join(" ", args));
        }
예제 #3
0
 public override int GetHashCode()
 {
     return(PredIndex.GetHashCode() ^
            (MinDelay.GetHashCode() << 1) ^
            MaxDelay.GetHashCode());
 }
예제 #4
0
 public override int GetHashCode()
 {
     return(Task.GetHashCode() ^
            MinDelay.GetHashCode() ^
            (3 * MaxDelay.GetHashCode()));
 }