diff --git a/Scenes/PerfDetails.cs b/Scenes/PerfDetails.cs index 219ee7c..32bfafa 100644 --- a/Scenes/PerfDetails.cs +++ b/Scenes/PerfDetails.cs @@ -3,13 +3,10 @@ using Godot; public partial class PerfDetails : Label { - [Export] - public bool ShowDetails = true; - public override void _Process(double delta) { Text = ""; - if (!ShowDetails) return; + if (!Main.Instance.DebugMode) return; int activeElements = 0; foreach (Chunk c in Main.Instance.Level.GetChunks()) diff --git a/Scenes/main.tscn b/Scenes/main.tscn index 187b0df..9d34974 100644 --- a/Scenes/main.tscn +++ b/Scenes/main.tscn @@ -7,7 +7,6 @@ [node name="Main" type="Node2D"] script = ExtResource("1_k1i8e") -DebugVisualization = true BrushSize = 2 RainAmount = 1.0 diff --git a/Scripts/Elements/Element.cs b/Scripts/Elements/Element.cs index 1a1a77f..924ea16 100644 --- a/Scripts/Elements/Element.cs +++ b/Scripts/Elements/Element.cs @@ -34,6 +34,7 @@ public class Element { Chunk = chunk; lastMove = Engine.GetFramesDrawn(); Active = false; + wasMovedThisTick = true; } public bool Active { @@ -44,7 +45,6 @@ public class Element { active = value; Chunk.SetElementActive(this, value); Moved(); - // SetDebugColor(value, new Color(0.2f, 0.2f, 0.2f)); } } @@ -109,7 +109,7 @@ public class Element { } public void SetDebugColor(Color color) { - if (!Main.Instance.DebugVisualization) return; + if (!Main.Instance.DebugMode) return; this.color = color; wasMovedThisTick = true; diff --git a/Scripts/Main.cs b/Scripts/Main.cs index fc34d49..50d9ce8 100644 --- a/Scripts/Main.cs +++ b/Scripts/Main.cs @@ -3,7 +3,7 @@ using FOU.Scripts.Elements; using Godot; public partial class Main : Node2D { - [Export] public bool DebugVisualization = false; + [Export] public bool DebugMode = false; [Export] public int BrushSize = 5; [Export] public float TextureResolution = 0.5f;