From 723e66a82606ee78ca4156a0c0a850185b4c0369 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 18 Aug 2025 18:43:54 -0300 Subject: IT'S OVER --- scripts/DungeonLevel.cs | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 scripts/DungeonLevel.cs (limited to 'scripts/DungeonLevel.cs') diff --git a/scripts/DungeonLevel.cs b/scripts/DungeonLevel.cs deleted file mode 100644 index 68751c5..0000000 --- a/scripts/DungeonLevel.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Godot; -using System; - -public partial class DungeonLevel : Node2D -{ - private TileMapLayer buildingLayer; - public Godot.Collections.Array Actors { get; private set; } = []; - - private Node2D actorsNode; - - public override void _Ready() - { - base._Ready(); - - buildingLayer = GetNode("Dungeon"); - actorsNode = GetNode("Actors"); - } - - public void InsertActor(Actor actor) { - Actors.Add(actor); - actorsNode.AddChild(actor); - } - - public bool IsTileWalkable(Vector2I pos) { - TileData tile = buildingLayer.GetCellTileData(pos); - - if (tile == null) return false; - - return (bool)tile.GetCustomData("isWalkable"); - } - - public Actor GetBlockingActorAtPosition(Vector2I pos) { - foreach (Actor actor in Actors) { - if (actor.GridPosition == pos && actor.BlocksMovement) { - return actor; - } - } - return null; - } -} -- cgit v1.2.3