summaryrefslogtreecommitdiff
path: root/scenes
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-08-16 15:56:28 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-08-16 15:56:28 -0300
commitb05cfd5577884d1a398dbb226e2082af5fe8f8fa (patch)
tree26961e5c63e87c5d1c17422cdf6ab4493b2d8f55 /scenes
parentc411c496394c7a782854e03f2be8fab4cc1e2a81 (diff)
Sistema de turnos básico
Diffstat (limited to 'scenes')
-rw-r--r--scenes/character.tscn5
-rw-r--r--scenes/skeleton.tscn2
-rw-r--r--scenes/test_map.tscn21
-rw-r--r--scenes/turn_manager.tscn6
4 files changed, 24 insertions, 10 deletions
diff --git a/scenes/character.tscn b/scenes/character.tscn
index 825f5bf..4b23758 100644
--- a/scenes/character.tscn
+++ b/scenes/character.tscn
@@ -3,7 +3,10 @@
[ext_resource type="Texture2D" uid="uid://dwky8qc2y602k" path="res://assets/sprites/character.png" id="1_agfs1"]
[ext_resource type="Script" uid="uid://c840l08453pu2" path="res://scripts/Character.cs" id="2_rkhd4"]
-[node name="Character" type="Sprite2D"]
+[node name="Character" type="Sprite2D" groups=["TimeSlave"]]
texture_filter = 1
texture = ExtResource("1_agfs1")
script = ExtResource("2_rkhd4")
+
+[node name="Camera2D" type="Camera2D" parent="."]
+zoom = Vector2(4, 4)
diff --git a/scenes/skeleton.tscn b/scenes/skeleton.tscn
index 8471909..1dc7727 100644
--- a/scenes/skeleton.tscn
+++ b/scenes/skeleton.tscn
@@ -3,6 +3,6 @@
[ext_resource type="Texture2D" uid="uid://dh5sgjdwkps88" path="res://assets/sprites/skeleton.png" id="1_pbvs3"]
[ext_resource type="Script" uid="uid://bef1fo3vgvxej" path="res://scripts/Enemy.cs" id="2_txkty"]
-[node name="Skeleton" type="Sprite2D"]
+[node name="Skeleton" type="Sprite2D" groups=["TimeSlave"]]
texture = ExtResource("1_pbvs3")
script = ExtResource("2_txkty")
diff --git a/scenes/test_map.tscn b/scenes/test_map.tscn
index 446e6d7..a5c4039 100644
--- a/scenes/test_map.tscn
+++ b/scenes/test_map.tscn
@@ -1,24 +1,29 @@
-[gd_scene load_steps=4 format=4 uid="uid://u5h6iqyi8wd0"]
+[gd_scene load_steps=6 format=4 uid="uid://u5h6iqyi8wd0"]
[ext_resource type="TileSet" uid="uid://biilh0ufacguh" path="res://assets/test_tileset.tres" id="1_57l66"]
+[ext_resource type="Script" uid="uid://dwubb28wt4bhe" path="res://scripts/DungeonLevel.cs" id="1_p21b5"]
[ext_resource type="PackedScene" uid="uid://bl01llfbscv6r" path="res://scenes/character.tscn" id="2_fn2sa"]
[ext_resource type="PackedScene" uid="uid://bsn4a4tfensy8" path="res://scenes/skeleton.tscn" id="3_57l66"]
+[ext_resource type="PackedScene" uid="uid://ie3vpgatjvkw" path="res://scenes/turn_manager.tscn" id="4_p21b5"]
-[node name="Node2D" type="Node2D"]
+[node name="DungeonLevel" type="Node2D"]
+script = ExtResource("1_p21b5")
[node name="Map" type="TileMapLayer" parent="."]
texture_filter = 1
tile_map_data = PackedByteArray("AAAHAAcAAAAAAAAAAAAIAAcAAAAAAAAAAAAJAAcAAAAAAAAAAAAKAAcAAAAAAAAAAAALAAcAAAAAAAAAAAAMAAcAAAAAAAAAAAANAAcAAAAAAAAAAAAOAAcAAAAAAAAAAAAOAAgAAAAAAAAAAAANAAgAAAAAAAAAAAAMAAgAAAAAAAAAAAALAAgAAAAAAAAAAAAKAAgAAAAAAAAAAAAJAAgAAAAAAAAAAAAIAAgAAAAAAAAAAAAHAAgAAAAAAAAAAAAHAAkAAAAAAAAAAAAIAAkAAAAAAAAAAAAKAAkAAAAAAAAAAAALAAkAAAAAAAAAAAAMAAkAAAAAAAAAAAANAAkAAAAAAAAAAAAOAAkAAAAAAAAAAAAJAAkAAAAAAAAAAAAGAAYAAAABAAAAAAAGAAcAAAABAAAAAAAGAAgAAAAAAAAAAAAGAAkAAAABAAAAAAAGAAoAAAABAAAAAAAHAAoAAAABAAAAAAAIAA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AQAAAAAAAAAAAAUAAQAAAAAAAAAAAAUAAUAAAAAAAAAAAAVAAUAAAAAAAAAAAAVAAYAAAAAAAAAAAAVAAcAAAAAAAAAAAAVAAgAAAAAAAAAAAAVAAkAAAAAAAAAAAASAAcAAAAAAAAAAAASAAYAAAAAAAAAAAASAAUAAAAAAAAAAAATAAUAAAAAAAAAAAAUAAYAAAAAAAAAAAAUAAcAAAAAAAAAAAAUAAgAAAAAAAAAAAATAAcAAAAAAAAAAAATAAYAAAAAAAAAAAAQAAQAAAAAAAAAAAAQAAgAAAAAAAAAAAARAAYAAAAAAAAAAAASAAkAAAAAAAAAAAAWAAkAAAAAAAAAAAAWAAgAAAAAAAAAAAAWAAcAAAAAAAAAAAAWAAYAAAAAAAAAAAAWAAUAAAAAAAAAAAAWAAQAAAAAAAAAAAAVAAQAAAAAAAAAAAA=")
tile_set = ExtResource("1_57l66")
-[node name="Camera2D" type="Camera2D" parent="."]
-anchor_mode = 0
-zoom = Vector2(2, 2)
+[node name="Skeleton" parent="." node_paths=PackedStringArray("Map") instance=ExtResource("3_57l66")]
+position = Vector2(120, 121)
+Map = NodePath("../Map")
[node name="Character" parent="." node_paths=PackedStringArray("Map") instance=ExtResource("2_fn2sa")]
position = Vector2(135, 135)
Map = NodePath("../Map")
-[node name="Skeleon" parent="." node_paths=PackedStringArray("Map") instance=ExtResource("3_57l66")]
-position = Vector2(184, 136)
-Map = NodePath("../Map")
+[node name="TurnManager" parent="." instance=ExtResource("4_p21b5")]
+
+[connection signal="actionPerformed" from="Skeleton" to="TurnManager" method="OnActionEnd"]
+[connection signal="actionPerformed" from="Character" to="TurnManager" method="OnActionEnd"]
+[connection signal="turnEnd" from="TurnManager" to="." method="OnTurnEnd"]
diff --git a/scenes/turn_manager.tscn b/scenes/turn_manager.tscn
new file mode 100644
index 0000000..4a1cf5c
--- /dev/null
+++ b/scenes/turn_manager.tscn
@@ -0,0 +1,6 @@
+[gd_scene load_steps=2 format=3 uid="uid://ie3vpgatjvkw"]
+
+[ext_resource type="Script" uid="uid://ynjn2pmluvf6" path="res://scripts/TurnManager.cs" id="1_3c2a3"]
+
+[node name="TurnManager" type="Node"]
+script = ExtResource("1_3c2a3")