// Do not override EqualsInherited to avoid recursion when comparing the parent blue teleportation portal /// <summary>Sets the properties of this <seealso cref="YellowTeleportationPortal"/> according to the linked <seealso cref="BlueTeleportationPortal"/>.</summary> private void SetProperties(BlueTeleportationPortal a) { foreach (var p in properties) { p.SetValue(this, p.GetValue(a)); } Y = a.Y + a.YellowTeleportationPortalDistance; Rotation = a.Rotation; }
/// <summary>Initializes a new instance of the <seealso cref="YellowTeleportationPortal"/> class.</summary> public YellowTeleportationPortal(BlueTeleportationPortal p) : base() { LinkedTeleportationPortal = p; SetProperties(p); }