mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[server] Make *Reference classes implement ICloneable
This commit is contained in:
parent
451b3a0171
commit
2e97f91efe
3 changed files with 21 additions and 1 deletions
|
@ -90,5 +90,14 @@ namespace Nibriboard.RippleSpace
|
|||
y
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a clone of this ChunkReference.
|
||||
/// </summary>
|
||||
/// <returns>The newly-cloned instance.</returns>
|
||||
public override object Clone()
|
||||
{
|
||||
return new ChunkReference(Plane, X, Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,5 +67,14 @@ namespace Nibriboard.RippleSpace
|
|||
y
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a clone of this LocationReference.
|
||||
/// </summary>
|
||||
/// <returns>The newly-cloned instance.</returns>
|
||||
public override object Clone()
|
||||
{
|
||||
return new LocationReference(Plane, X, Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace Nibriboard.RippleSpace
|
|||
/// <summary>
|
||||
/// An abstract class representing a coordinate reference to a location.
|
||||
/// </summary>
|
||||
public abstract class Reference
|
||||
public abstract class Reference : ICloneable
|
||||
{
|
||||
public readonly Plane Plane;
|
||||
|
||||
|
@ -22,5 +22,7 @@ namespace Nibriboard.RippleSpace
|
|||
{
|
||||
return $"({X}, {Y}, {Plane.Name})";
|
||||
}
|
||||
|
||||
public abstract object Clone();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue