adjusted debug mode
This commit is contained in:
@@ -3,13 +3,10 @@ using Godot;
|
|||||||
|
|
||||||
public partial class PerfDetails : Label
|
public partial class PerfDetails : Label
|
||||||
{
|
{
|
||||||
[Export]
|
|
||||||
public bool ShowDetails = true;
|
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
Text = "";
|
Text = "";
|
||||||
if (!ShowDetails) return;
|
if (!Main.Instance.DebugMode) return;
|
||||||
|
|
||||||
int activeElements = 0;
|
int activeElements = 0;
|
||||||
foreach (Chunk c in Main.Instance.Level.GetChunks())
|
foreach (Chunk c in Main.Instance.Level.GetChunks())
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
[node name="Main" type="Node2D"]
|
[node name="Main" type="Node2D"]
|
||||||
script = ExtResource("1_k1i8e")
|
script = ExtResource("1_k1i8e")
|
||||||
DebugVisualization = true
|
|
||||||
BrushSize = 2
|
BrushSize = 2
|
||||||
RainAmount = 1.0
|
RainAmount = 1.0
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ public class Element {
|
|||||||
Chunk = chunk;
|
Chunk = chunk;
|
||||||
lastMove = Engine.GetFramesDrawn();
|
lastMove = Engine.GetFramesDrawn();
|
||||||
Active = false;
|
Active = false;
|
||||||
|
wasMovedThisTick = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Active {
|
public bool Active {
|
||||||
@@ -44,7 +45,6 @@ public class Element {
|
|||||||
active = value;
|
active = value;
|
||||||
Chunk.SetElementActive(this, value);
|
Chunk.SetElementActive(this, value);
|
||||||
Moved();
|
Moved();
|
||||||
// SetDebugColor(value, new Color(0.2f, 0.2f, 0.2f));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ public class Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void SetDebugColor(Color color) {
|
public void SetDebugColor(Color color) {
|
||||||
if (!Main.Instance.DebugVisualization) return;
|
if (!Main.Instance.DebugMode) return;
|
||||||
|
|
||||||
this.color = color;
|
this.color = color;
|
||||||
wasMovedThisTick = true;
|
wasMovedThisTick = true;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ using FOU.Scripts.Elements;
|
|||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
public partial class Main : Node2D {
|
public partial class Main : Node2D {
|
||||||
[Export] public bool DebugVisualization = false;
|
[Export] public bool DebugMode = false;
|
||||||
|
|
||||||
[Export] public int BrushSize = 5;
|
[Export] public int BrushSize = 5;
|
||||||
[Export] public float TextureResolution = 0.5f;
|
[Export] public float TextureResolution = 0.5f;
|
||||||
|
|||||||
Reference in New Issue
Block a user