adjusted debug mode
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_k1i8e")
|
||||
DebugVisualization = true
|
||||
BrushSize = 2
|
||||
RainAmount = 1.0
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user