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)); }
/// <summary> /// /// </summary> /// <param name="writer">XmlWriter handle</param> /// <param name="id">Decoration Id</param> /// <returns></returns> public bool Save(XmlWriter writer, int id) { if (writer == null) { return(false); } writer.WriteStartElement("decoration"); writer.WriteAttributeString("id", id.ToString()); writer.WriteAttributeString("isblocking", IsBlocking.ToString()); writer.WriteAttributeString("forcedisplay", ForceDisplay.ToString()); writer.WriteAttributeString("onhack", OnHackId.ToString()); writer.WriteAttributeString("onbash", OnBashId.ToString()); writer.WriteAttributeString("onclick", OnClickId.ToString()); writer.WriteAttributeString("hideitems", HideItems.ToString()); writer.WriteStartElement("item"); writer.WriteAttributeString("x", ItemLocation.X.ToString()); writer.WriteAttributeString("y", ItemLocation.Y.ToString()); writer.WriteEndElement(); foreach (ViewFieldPosition vfp in Enum.GetValues(typeof(ViewFieldPosition))) { writer.WriteStartElement(vfp.ToString()); writer.WriteAttributeString("id", TileId[(int)vfp].ToString()); writer.WriteAttributeString("x", Location[(int)vfp].X.ToString()); writer.WriteAttributeString("y", Location[(int)vfp].Y.ToString()); writer.WriteAttributeString("swap", Swap[(int)vfp].ToString()); writer.WriteEndElement(); } writer.WriteEndElement(); return(true); }