From 5045b4421e551fa5d959bb4d6ca14b4a9a2f62da Mon Sep 17 00:00:00 2001 From: rogo Date: Thu, 17 Apr 2025 20:21:24 +0200 Subject: [PATCH] fixed inactivity timer --- Scripts/Chunk.cs | 2 ++ Scripts/Elements/Element.cs | 4 ++++ 2 files changed, 6 insertions(+) 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(); + } }