Massive refactor (inventory menu still a little broken but its Good Enough)
This commit is contained in:
@@ -5,14 +5,21 @@ using DialogueManagerRuntime;
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public interface IMap : INode3D
|
||||
{
|
||||
event Map.TeleportReachedEventHandler TeleportReached;
|
||||
event Map.DialogueDecisionMadeEventHandler DialogueDecisionMade;
|
||||
event Map.DungeonFinishedGeneratingEventHandler DungeonFinishedGenerating;
|
||||
|
||||
public List<IDungeonFloor> Floors { get; }
|
||||
|
||||
public Vector3 GetPlayerSpawnPoint();
|
||||
|
||||
public void SpawnNextFloor();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +30,15 @@ public partial class Map : Node3D, IMap
|
||||
|
||||
[Node] public Area3D Teleport { get; set; } = default!;
|
||||
|
||||
[Signal]
|
||||
public delegate void TeleportReachedEventHandler();
|
||||
|
||||
[Signal]
|
||||
public delegate void DialogueDecisionMadeEventHandler();
|
||||
|
||||
[Signal]
|
||||
public delegate void DungeonFinishedGeneratingEventHandler();
|
||||
|
||||
public List<IDungeonFloor> Floors { get; set; } = default!;
|
||||
|
||||
private IDungeonFloor _currentFloor;
|
||||
@@ -32,6 +48,8 @@ public partial class Map : Node3D, IMap
|
||||
Floors = GetChildren().OfType<IDungeonFloor>().ToList();
|
||||
_currentFloor = Floors.ElementAt(0);
|
||||
Teleport.BodyEntered += OnTeleportEntered;
|
||||
Teleport.GlobalPosition = _currentFloor.GetTeleportSpawnPoint();
|
||||
DialogueManager.DialogueEnded += DecisionMade;
|
||||
}
|
||||
|
||||
public Vector3 GetPlayerSpawnPoint()
|
||||
@@ -39,10 +57,27 @@ public partial class Map : Node3D, IMap
|
||||
return _currentFloor.GetPlayerSpawnPoint();
|
||||
}
|
||||
|
||||
public void SpawnNextFloor()
|
||||
{
|
||||
var oldFloor = _currentFloor;
|
||||
Floors.Remove(oldFloor);
|
||||
oldFloor.CallDeferred(MethodName.QueueFree, []);
|
||||
_currentFloor = Floors.ElementAt(0);
|
||||
_currentFloor.InitializeDungeon();
|
||||
Teleport.GlobalPosition = _currentFloor.GetTeleportSpawnPoint();
|
||||
EmitSignal(SignalName.DungeonFinishedGenerating);
|
||||
}
|
||||
|
||||
private void DecisionMade(Resource resource)
|
||||
{
|
||||
EmitSignal(SignalName.DialogueDecisionMade);
|
||||
}
|
||||
|
||||
private void OnTeleportEntered(Node3D body)
|
||||
{
|
||||
DialogueManager.GetCurrentScene = (() => this);
|
||||
var dialogueResource = GD.Load<Resource>("res://src/ui/dialogue/FloorExit.dialogue");
|
||||
DialogueController.ShowDialogue(dialogueResource, "floor_exit");
|
||||
EmitSignal(SignalName.TeleportReached);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,16 @@ using Chickensoft.AutoInject;
|
||||
using Chickensoft.GodotNodeInterfaces;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public interface IDungeonFloor : INode3D
|
||||
{
|
||||
void InitializeDungeon();
|
||||
|
||||
public Vector3 GetPlayerSpawnPoint();
|
||||
|
||||
public Vector3 GetTeleportSpawnPoint();
|
||||
}
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
@@ -17,13 +21,34 @@ public partial class DungeonFloor : Node3D, IDungeonFloor
|
||||
|
||||
[Node] public GodotObject DungeonGenerator { get; set; } = default!;
|
||||
|
||||
internal List<IDungeonRoom> Rooms { get; private set; }
|
||||
|
||||
public void InitializeDungeon()
|
||||
{
|
||||
Rooms = new List<IDungeonRoom>();
|
||||
DungeonGenerator.Call("generate");
|
||||
Rooms = FindAllDungeonRooms(GetChildren().ToList(), Rooms);
|
||||
}
|
||||
|
||||
public Vector3 GetPlayerSpawnPoint()
|
||||
{
|
||||
return Vector3.Zero;
|
||||
return Rooms.First().PlayerSpawn.GlobalPosition;
|
||||
}
|
||||
|
||||
public Vector3 GetTeleportSpawnPoint()
|
||||
{
|
||||
return Rooms.First().TeleportSpawn.GlobalPosition;
|
||||
}
|
||||
|
||||
private List<IDungeonRoom> FindAllDungeonRooms(List<Node> nodesToSearch, List<IDungeonRoom> roomsFound)
|
||||
{
|
||||
if (nodesToSearch.Count == 0)
|
||||
return roomsFound;
|
||||
|
||||
foreach (var node in nodesToSearch)
|
||||
if (node is IDungeonRoom dungeonRoom)
|
||||
roomsFound.Add(dungeonRoom);
|
||||
|
||||
return FindAllDungeonRooms(nodesToSearch.SelectMany(x => x.GetChildren()).ToList(), roomsFound);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ public partial class Overworld : Node3D, IDungeonFloor
|
||||
|
||||
[Node] public Marker3D PlayerSpawnPoint { get; set; } = default!;
|
||||
|
||||
[Node] public Marker3D ExitSpawnPoint { get; set; } = default!;
|
||||
|
||||
public void InitializeDungeon()
|
||||
{
|
||||
GameRepo.SetPlayerGlobalPosition(PlayerSpawnPoint.GlobalPosition);
|
||||
@@ -22,4 +24,9 @@ public partial class Overworld : Node3D, IDungeonFloor
|
||||
{
|
||||
return PlayerSpawnPoint.GlobalPosition;
|
||||
}
|
||||
|
||||
public Vector3 GetTeleportSpawnPoint()
|
||||
{
|
||||
return ExitSpawnPoint.GlobalPosition;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1097,15 +1097,18 @@ data = PackedVector3Array(0.5414, 0.1147, -0.9114, -0.5965, 0.1148, -1.0371, -0.
|
||||
size = Vector2(35, 30)
|
||||
|
||||
[node name="Antechamber" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.73082, 0, -1.86841)
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1.73082, 0, -1.86841)
|
||||
script = ExtResource("1_tdydv")
|
||||
size_in_voxels = Vector3i(5, 2, 5)
|
||||
voxel_scale = Vector3(12, 12, 12)
|
||||
|
||||
[node name="Room" type="Node3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -6.03201, 0)
|
||||
script = ExtResource("16_osbes")
|
||||
|
||||
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="Room"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.04836, 3.10489, 12.6166)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.04836, 9.49697, 12.6166)
|
||||
navigation_mesh = SubResource("NavigationMesh_2x5qh")
|
||||
|
||||
[node name="ANTECHAMBER" type="Node3D" parent="Room/NavigationRegion3D"]
|
||||
@@ -1196,15 +1199,9 @@ skeleton = NodePath("")
|
||||
transform = Transform3D(0, 0, -0.515006, 0, 0.54653, 0, 0.593558, 0, 0, 116.446, 7.82144, 86.6174)
|
||||
shape = SubResource("ConcavePolygonShape3D_cnvi5")
|
||||
|
||||
[node name="DOOR" type="Marker3D" parent="Room"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -13.1142, -8.45784, 32.0232)
|
||||
|
||||
[node name="DOOR2" type="Marker3D" parent="Room"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.92078, -8.62051, -27.067)
|
||||
|
||||
[node name="PlayerSpawn" type="Marker3D" parent="Room"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -11.8813, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -5.38078, 0)
|
||||
|
||||
[node name="Minimap Texture" type="MeshInstance3D" parent="Room"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00325966, -7.7801, 0)
|
||||
@@ -1217,170 +1214,170 @@ skeleton = NodePath("../..")
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="ItemSpawn1" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.83448, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.83448, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn2" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.44186, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -7.44186, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn3" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.09183, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.09183, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn4" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.83448, -11.8091, -5.86665)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.83448, -5.49583, -5.86665)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn5" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.21845, -11.8091, -5.59059)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.21845, -5.49583, -5.59059)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn6" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn7" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn8" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn9" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn10" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn11" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn12" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn13" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn14" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn15" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn16" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn17" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn18" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn19" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn20" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn21" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn22" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn23" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn24" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn25" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn26" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn27" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn28" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn29" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn30" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn31" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn32" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn33" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn34" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn35" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn36" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn37" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn38" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn39" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="ItemSpawn40" type="Marker3D" parent="Room/ItemSpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -11.8091, -2.92704)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10.8145, -5.49583, -2.92704)
|
||||
gizmo_extents = 1.0
|
||||
|
||||
[node name="EnemySpawnPoints" type="Node3D" parent="Room"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="EnemySpawn1" type="Marker3D" parent="Room/EnemySpawnPoints"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.71409, -11.0741, 0)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 8.71409, -3.95028, 0)
|
||||
|
||||
[node name="ItemDatabase" parent="Room" instance=ExtResource("17_50pl8")]
|
||||
unique_name_in_owner = true
|
||||
@@ -1389,5 +1386,12 @@ unique_name_in_owner = true
|
||||
unique_name_in_owner = true
|
||||
SpawnRate = PackedFloat32Array(1)
|
||||
|
||||
[node name="ExitSpawnLocation" type="Marker3D" parent="Room" groups=["Exit"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06499, -11.8837, -9.52855)
|
||||
[node name="TeleportSpawn" type="Marker3D" parent="Room" groups=["Exit"]]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06499, -5.37073, -18.2257)
|
||||
|
||||
[node name="DOOR1" type="Marker3D" parent="Room"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.42407, 0, -28.6818)
|
||||
|
||||
[node name="DOOR2" type="Marker3D" parent="Room"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.1207, 0, 30.0499)
|
||||
|
||||
@@ -9,6 +9,7 @@ public interface IDungeonRoom : INode3D
|
||||
{
|
||||
DungeonRoomLogic DungeonRoomLogic { get; }
|
||||
public Marker3D PlayerSpawn { get; set; }
|
||||
public Marker3D TeleportSpawn { get; set; }
|
||||
}
|
||||
|
||||
[Meta(typeof(IAutoNode))]
|
||||
@@ -24,6 +25,8 @@ public partial class DungeonRoom : Node3D, IDungeonRoom, IProvide<DungeonRoomLog
|
||||
|
||||
[Node] public Marker3D PlayerSpawn { get; set; } = default!;
|
||||
|
||||
[Node] public Marker3D TeleportSpawn { get; set; } = default!;
|
||||
|
||||
[Node] public Node3D ItemSpawnPoints { get; set; } = default!;
|
||||
|
||||
[Node] public Node3D EnemySpawnPoints { get; set; } = default!;
|
||||
|
||||
@@ -119,3 +119,7 @@ transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 0,
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="NavigationRegion3D/StaticBody3D3"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.320954, -4.84337, -0.0752945)
|
||||
shape = SubResource("BoxShape3D_q0wqs")
|
||||
|
||||
[node name="ExitSpawnLocation" type="Marker3D" parent="." groups=["Exit"]]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06499, -11.8837, -9.52855)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dvnc26rebk6o0"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dvnc26rebk6o0"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/map/dungeon/floors/Overworld.cs" id="1_5hmt3"]
|
||||
[ext_resource type="PackedScene" uid="uid://dvj5lwymr02xn" path="res://src/map/overworld/OverworldMap.tscn" id="2_qwsky"]
|
||||
[ext_resource type="PackedScene" uid="uid://d4l4qutp8x40c" path="res://src/npc/rat/NPC.tscn" id="3_4sm8u"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjqgl5u05ia04" path="res://src/map/dungeon/Teleport.tscn" id="4_4sp6u"]
|
||||
|
||||
[node name="Overworld" type="Node3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63488, -5.13176)
|
||||
@@ -21,6 +20,3 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.49531, 1.49242, 0)
|
||||
|
||||
[node name="NPC" parent="." instance=ExtResource("3_4sm8u")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.1364, 2.01954, -3.50556)
|
||||
|
||||
[node name="Teleport" parent="." instance=ExtResource("4_4sp6u")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.25983, 1.61999, 5.45137)
|
||||
|
||||
7
src/map/state/MapLogic.Input.cs
Normal file
7
src/map/state/MapLogic.Input.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace GameJamDungeon;
|
||||
public partial class MapLogic
|
||||
{
|
||||
public static class Input
|
||||
{
|
||||
}
|
||||
}
|
||||
16
src/map/state/MapLogic.State.cs
Normal file
16
src/map/state/MapLogic.State.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.LogicBlocks;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public partial class MapLogic
|
||||
{
|
||||
[Meta]
|
||||
public partial record State : StateLogic<State>
|
||||
{
|
||||
public State()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
13
src/map/state/MapLogic.cs
Normal file
13
src/map/state/MapLogic.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Chickensoft.LogicBlocks;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public interface IMapLogic : ILogicBlock<MapLogic.State>;
|
||||
|
||||
[Meta]
|
||||
[LogicBlock(typeof(State))]
|
||||
public partial class MapLogic : LogicBlock<MapLogic.State>, IMapLogic
|
||||
{
|
||||
public override Transition GetInitialState() => To<State>();
|
||||
}
|
||||
Reference in New Issue
Block a user