less console spaming with debug key

This commit is contained in:
2022-11-14 21:28:24 +01:00
parent 1c4894a286
commit 6a8d400574
2 changed files with 6 additions and 1 deletions

View File

@@ -65,6 +65,11 @@ move_down={
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
debug={
"deadzone": 0.5,
"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":16777246,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
[mono]

View File

@@ -25,7 +25,7 @@ public class Player : KinematicBody2D
int currentCellID = 1;
var tilemap = GetNode<TileMap>("/root/Main/World/Foreground");
Vector2 coordinates = tilemap.WorldToMap(Position);
if (Input.IsKeyPressed((int)KeyList.F3))
if (Input.IsActionJustReleased("debug"))
{
GD.Print("All Number 1 tiles: " + tilemap.GetUsedCellsById(1));
GD.Print("Player coordinate: " + coordinates);