コード例 #1
0
        // 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;
        }
コード例 #2
0
 /// <summary>Initializes a new instance of the <seealso cref="YellowTeleportationPortal"/> class.</summary>
 public YellowTeleportationPortal(BlueTeleportationPortal p)
     : base()
 {
     LinkedTeleportationPortal = p;
     SetProperties(p);
 }