diff --git a/Scripts/Chunk.cs b/Scripts/Chunk.cs index cab7041..7486d7b 100644 --- a/Scripts/Chunk.cs +++ b/Scripts/Chunk.cs @@ -157,7 +157,9 @@ public class Chunk { swapTo.Chunk.Elements[swapTo.Position.X, swapTo.Position.Y] = swapTo; what.Active = true; + what.Moved(); swapTo.Active = true; + swapTo.Moved(); } public override string ToString() { diff --git a/Scripts/Elements/Element.cs b/Scripts/Elements/Element.cs index 29fad70..62fe24c 100644 --- a/Scripts/Elements/Element.cs +++ b/Scripts/Elements/Element.cs @@ -110,4 +110,8 @@ public class Element { this.color = color; } + + public void Moved() { + lastMove = Engine.GetFramesDrawn(); + } }