summaryrefslogtreecommitdiff
path: root/scripts/entities/actors/Inspector.cs
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-09 19:09:34 -0300
commitc6bbb834f7758027c0df338f1520f34fad3befea (patch)
tree1818cd23c24be16fbe19b16dd0a510874d440d83 /scripts/entities/actors/Inspector.cs
parentf1b51bed52ffbd90b5b7cc8dcfc6f0484bbbeb3c (diff)
Organização
Diffstat (limited to 'scripts/entities/actors/Inspector.cs')
-rw-r--r--scripts/entities/actors/Inspector.cs40
1 files changed, 0 insertions, 40 deletions
diff --git a/scripts/entities/actors/Inspector.cs b/scripts/entities/actors/Inspector.cs
deleted file mode 100644
index e340543..0000000
--- a/scripts/entities/actors/Inspector.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using Godot;
-
-/// <summary>
-/// Isto é uma abominação
-/// </summary>
-public partial class Inspector : Sprite2D
-{
- private Vector2I gridPosition = Vector2I.Zero;
- /// <summary>
- /// Posição do inspetor no espaço. Diferentemente de Position, GridPosition tem como formato
- /// os tiles do mapa.
- /// </summary>
- public Vector2I GridPosition {
- set {
- gridPosition = value;
- // O sistema de coordenadas do Godot é em pixels, mas faz mais sentido para o jogo utilizar coordenadas em tiles.
- // Esta propriedade converte um sistema para o outro automaticamente.
- Position = Grid.GridToWorld(value);
- }
- get => gridPosition;
- }
-
- public override void _Ready() {
- base._Ready();
- Camera2D camera = GetNode<Camera2D>("Camera2D");
- camera.Enabled = true;
- camera.MakeCurrent();
-
- SignalBus.Instance.EmitSignal(SignalBus.SignalName.InspectorMoved, GridPosition);
- }
-
- /// <summary>
- /// O Inspetor não faz parte do mapa.
- /// </summary>
- /// <param name="offset"></param>
- public void Walk(Vector2I offset) {
- GridPosition += offset;
- SignalBus.Instance.EmitSignal(SignalBus.SignalName.InspectorMoved, GridPosition);
- }
-} \ No newline at end of file