Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ public class BrickCurveGenerator : CurveGenerator

public override int Type => LevelEntryTypes.BrickCurveGenerator;

public override object Clone()
{
var copy = new BrickCurveGenerator(Level);
base.CloneTo(copy);
return copy;
}

public BrickCurveGenerator(Level level)
: base(level)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,10 @@ private PointF GetVisualLocation(PointF location)
return location;
}

public override object Clone()
protected void CloneTo(CurveGenerator copy)
{
var copy = new BrickCurveGenerator(Level);
base.CloneTo(copy);
copy.BezierPath = BezierPath.Clone();
return copy;
}

public void RecalculateOrigin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public PegCurveGenerator(Level level)

public override int Type => LevelEntryTypes.PegCurveGenerator;

public override object Clone()
{
var copy = new PegCurveGenerator(Level);
base.CloneTo(copy);
return copy;
}

public override void InvalidatePath()
{
_cache.Clear();
Expand Down
Loading