fuzzyworld

godot-shooter / commit

Adding debug that is connected to space-bar, which is hopefully only going to work in debug builds.

e7c3ffe2a74a26e39814d65cf3f3f8da211351f1 · Pavel Safronov · 2023-11-17 11:56:48 -0800 · parents cbc328fb3732

Adding debug that is connected to space-bar, which is hopefully only going to work in debug builds.
 actors/Player.gd | 5 +++++
 project.godot    | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/actors/Player.gd b/actors/Player.gd
index ca8fc0e..6995f82 100644
--- a/actors/Player.gd
+++ b/actors/Player.gd
@@ -257,3 +257,8 @@ func clear_destination() -> void:
 func _on_StartNewGameButton_pressed() -> void:
 	get_tree().paused = false
 	restart()
+
+func debug() -> void:
+	if OS.is_debug_build():
+		$Camera2D.zoom = $Camera2D.zoom * 1.5
+	pass
diff --git a/project.godot b/project.godot
index 75d84f8..28fe087 100644
--- a/project.godot
+++ b/project.godot
@@ -116,7 +116,8 @@ pause={
 }
 debug_action={
 "deadzone": 0.5,
-"events": [  ]
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
 }
 
 [layer_names]