Teleport works, item pickup is broken
This commit is contained in:
@@ -28,6 +28,10 @@ project/assembly_name="GameJamDungeon"
|
|||||||
|
|
||||||
enabled=PackedStringArray("res://addons/SimpleDungeons/plugin.cfg")
|
enabled=PackedStringArray("res://addons/SimpleDungeons/plugin.cfg")
|
||||||
|
|
||||||
|
[global_group]
|
||||||
|
|
||||||
|
Exit=""
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
|
|
||||||
MoveUp={
|
MoveUp={
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ namespace GameJamDungeon
|
|||||||
|
|
||||||
[Node] public ISubViewport GameWindow { get; set; } = default!;
|
[Node] public ISubViewport GameWindow { get; set; } = default!;
|
||||||
|
|
||||||
[Node] public IAnimationPlayer AnimationPlayer { get; set; } = default!;
|
|
||||||
|
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
Instantiator = new Instantiator(GetTree());
|
Instantiator = new Instantiator(GetTree());
|
||||||
@@ -38,8 +36,6 @@ namespace GameJamDungeon
|
|||||||
AppLogic.Set(AppRepo);
|
AppLogic.Set(AppRepo);
|
||||||
Menu.NewGame += OnNewGame;
|
Menu.NewGame += OnNewGame;
|
||||||
Menu.Quit += OnQuit;
|
Menu.Quit += OnQuit;
|
||||||
AppRepo.ShowLoadingScreen += OnShowLoadingScreen;
|
|
||||||
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
|
|
||||||
this.Provide();
|
this.Provide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +47,6 @@ namespace GameJamDungeon
|
|||||||
.Handle((in AppLogic.Output.ShowLoadingScreen _) =>
|
.Handle((in AppLogic.Output.ShowLoadingScreen _) =>
|
||||||
{
|
{
|
||||||
Menu.Hide();
|
Menu.Hide();
|
||||||
AnimationPlayer.Play("load");
|
|
||||||
})
|
})
|
||||||
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
.Handle((in AppLogic.Output.SetupGameScene _) =>
|
||||||
{
|
{
|
||||||
@@ -70,19 +65,6 @@ namespace GameJamDungeon
|
|||||||
AppLogic.Start();
|
AppLogic.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnShowLoadingScreen()
|
|
||||||
{
|
|
||||||
AnimationPlayer.Play("wait_and_load");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AnimationPlayer_AnimationFinished(StringName animName)
|
|
||||||
{
|
|
||||||
if (animName == "wait_and_load")
|
|
||||||
Instantiator.SceneTree.Paused = false;
|
|
||||||
else if (animName == "load")
|
|
||||||
AppLogic.Input(new AppLogic.Input.LoadGameFinished());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnNewGame() => AppLogic.Input(new AppLogic.Input.NewGame());
|
public void OnNewGame() => AppLogic.Input(new AppLogic.Input.NewGame());
|
||||||
|
|
||||||
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
|
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
|
||||||
|
|||||||
@@ -1,86 +1,8 @@
|
|||||||
[gd_scene load_steps=7 format=3 uid="uid://cagfc5ridmteu"]
|
[gd_scene load_steps=3 format=3 uid="uid://cagfc5ridmteu"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://src/app/App.cs" id="1_rt73h"]
|
[ext_resource type="Script" path="res://src/app/App.cs" id="1_rt73h"]
|
||||||
[ext_resource type="PackedScene" uid="uid://rfvnddfqufho" path="res://src/menu/Menu.tscn" id="2_kvwo1"]
|
[ext_resource type="PackedScene" uid="uid://rfvnddfqufho" path="res://src/menu/Menu.tscn" id="2_kvwo1"]
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_mbxap"]
|
|
||||||
length = 0.001
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("LoadScreen:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(1, 1, 1, 0)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("SubViewportContainer:visible")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0),
|
|
||||||
"transitions": PackedFloat32Array(1),
|
|
||||||
"update": 1,
|
|
||||||
"values": [true]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_fa8xf"]
|
|
||||||
resource_name = "load"
|
|
||||||
length = 5.0
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("LoadScreen:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 0.466667, 4.03333, 5),
|
|
||||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1), Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
|
||||||
}
|
|
||||||
tracks/1/type = "value"
|
|
||||||
tracks/1/imported = false
|
|
||||||
tracks/1/enabled = true
|
|
||||||
tracks/1/path = NodePath("SubViewportContainer:visible")
|
|
||||||
tracks/1/interp = 1
|
|
||||||
tracks/1/loop_wrap = true
|
|
||||||
tracks/1/keys = {
|
|
||||||
"times": PackedFloat32Array(0, 4.03333),
|
|
||||||
"transitions": PackedFloat32Array(1, 1),
|
|
||||||
"update": 1,
|
|
||||||
"values": [false, true]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="Animation" id="Animation_r1pq3"]
|
|
||||||
resource_name = "wait_and_load"
|
|
||||||
length = 5.0
|
|
||||||
tracks/0/type = "value"
|
|
||||||
tracks/0/imported = false
|
|
||||||
tracks/0/enabled = true
|
|
||||||
tracks/0/path = NodePath("LoadScreen:modulate")
|
|
||||||
tracks/0/interp = 1
|
|
||||||
tracks/0/loop_wrap = true
|
|
||||||
tracks/0/keys = {
|
|
||||||
"times": PackedFloat32Array(0.966667, 2.03333, 4.03333, 5),
|
|
||||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
|
||||||
"update": 0,
|
|
||||||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1), Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_vkd35"]
|
|
||||||
_data = {
|
|
||||||
"RESET": SubResource("Animation_mbxap"),
|
|
||||||
"load": SubResource("Animation_fa8xf"),
|
|
||||||
"wait_and_load": SubResource("Animation_r1pq3")
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="App" type="CanvasLayer"]
|
[node name="App" type="CanvasLayer"]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
script = ExtResource("1_rt73h")
|
script = ExtResource("1_rt73h")
|
||||||
@@ -99,22 +21,7 @@ transparent_bg = true
|
|||||||
handle_input_locally = false
|
handle_input_locally = false
|
||||||
audio_listener_enable_3d = true
|
audio_listener_enable_3d = true
|
||||||
size = Vector2i(1920, 1080)
|
size = Vector2i(1920, 1080)
|
||||||
render_target_update_mode = 0
|
render_target_update_mode = 4
|
||||||
|
|
||||||
[node name="Menu" parent="." instance=ExtResource("2_kvwo1")]
|
[node name="Menu" parent="." instance=ExtResource("2_kvwo1")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="LoadScreen" type="ColorRect" parent="."]
|
|
||||||
modulate = Color(1, 1, 1, 0)
|
|
||||||
anchors_preset = 15
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
color = Color(0.235294, 0.235294, 0.784314, 1)
|
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
||||||
unique_name_in_owner = true
|
|
||||||
libraries = {
|
|
||||||
"": SubResource("AnimationLibrary_vkd35")
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ namespace GameJamDungeon
|
|||||||
|
|
||||||
event Action? MainMenuEntered;
|
event Action? MainMenuEntered;
|
||||||
|
|
||||||
event Action? ShowLoadingScreen;
|
|
||||||
|
|
||||||
void SkipSplashScreen();
|
void SkipSplashScreen();
|
||||||
|
|
||||||
void OnMainMenuEntered();
|
void OnMainMenuEntered();
|
||||||
@@ -23,8 +21,6 @@ namespace GameJamDungeon
|
|||||||
void OnExitGame();
|
void OnExitGame();
|
||||||
|
|
||||||
void OnGameOver();
|
void OnGameOver();
|
||||||
|
|
||||||
void OnShowLoadingScreen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AppRepo : IAppRepo
|
public class AppRepo : IAppRepo
|
||||||
@@ -33,7 +29,6 @@ namespace GameJamDungeon
|
|||||||
public event Action? MainMenuEntered;
|
public event Action? MainMenuEntered;
|
||||||
public event Action? GameEntered;
|
public event Action? GameEntered;
|
||||||
public event Action? GameExited;
|
public event Action? GameExited;
|
||||||
public event Action? ShowLoadingScreen;
|
|
||||||
|
|
||||||
private bool _disposedValue;
|
private bool _disposedValue;
|
||||||
|
|
||||||
@@ -47,8 +42,6 @@ namespace GameJamDungeon
|
|||||||
|
|
||||||
public void OnGameOver() => GameExited?.Invoke();
|
public void OnGameOver() => GameExited?.Invoke();
|
||||||
|
|
||||||
public void OnShowLoadingScreen() => ShowLoadingScreen?.Invoke();
|
|
||||||
|
|
||||||
protected void Dispose(bool disposing)
|
protected void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (!_disposedValue)
|
if (!_disposedValue)
|
||||||
@@ -60,7 +53,6 @@ namespace GameJamDungeon
|
|||||||
MainMenuEntered = null;
|
MainMenuEntered = null;
|
||||||
GameEntered = null;
|
GameEntered = null;
|
||||||
GameExited = null;
|
GameExited = null;
|
||||||
ShowLoadingScreen = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_disposedValue = true;
|
_disposedValue = true;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
[node name="CollisionDetector" type="Area3D"]
|
[node name="CollisionDetector" type="Area3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.500351, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.500351, 0)
|
||||||
disable_mode = 2
|
disable_mode = 2
|
||||||
collision_layer = 16
|
collision_layer = 18
|
||||||
collision_mask = 16
|
collision_mask = 18
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.633259, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.633259, 0)
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using Chickensoft.AutoInject;
|
|||||||
using Chickensoft.GodotNodeInterfaces;
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
public interface IGame : IProvide<IGameRepo>, INode3D;
|
public interface IGame : IProvide<IGameRepo>, INode3D;
|
||||||
|
|
||||||
@@ -14,6 +16,8 @@ public partial class Game : Node3D, IGame
|
|||||||
|
|
||||||
IGameRepo IProvide<IGameRepo>.Value() => GameRepo;
|
IGameRepo IProvide<IGameRepo>.Value() => GameRepo;
|
||||||
|
|
||||||
|
public IInstantiator Instantiator { get; set; } = default!;
|
||||||
|
|
||||||
public IGameLogic GameLogic { get; set; } = default!;
|
public IGameLogic GameLogic { get; set; } = default!;
|
||||||
|
|
||||||
public IGameRepo GameRepo { get; set; } = default!;
|
public IGameRepo GameRepo { get; set; } = default!;
|
||||||
@@ -28,21 +32,57 @@ public partial class Game : Node3D, IGame
|
|||||||
|
|
||||||
[Node] public NavigationRegion3D NavigationRegion { get; set; } = default!;
|
[Node] public NavigationRegion3D NavigationRegion { get; set; } = default!;
|
||||||
|
|
||||||
|
[Node] public Area3D Teleport { get; set; } = default!;
|
||||||
|
|
||||||
|
[Node] public IDungeonFloor Overworld { get; set; } = default!;
|
||||||
|
|
||||||
|
[Node] public IDungeonFloor Floor1 { get; set; } = default!;
|
||||||
|
|
||||||
|
[Node] public IDungeonFloor Floor2 { get; set; } = default!;
|
||||||
|
|
||||||
|
[Node] public IDungeonFloor Floor3 { get; set; } = default!;
|
||||||
|
|
||||||
|
[Node] public AnimationPlayer AnimationPlayer { get; set; } = default!;
|
||||||
|
|
||||||
|
private List<IDungeonFloor> Floors;
|
||||||
|
|
||||||
|
private int _currentFloor = -1;
|
||||||
|
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
GameRepo = new GameRepo();
|
GameRepo = new GameRepo();
|
||||||
GameLogic = new GameLogic();
|
GameLogic = new GameLogic();
|
||||||
GameLogic.Set(GameRepo);
|
GameLogic.Set(GameRepo);
|
||||||
GameLogic.Set(AppRepo);
|
GameLogic.Set(AppRepo);
|
||||||
|
Instantiator = new Instantiator(GetTree());
|
||||||
|
Floors = new List<IDungeonFloor> { Overworld, Floor1, Floor2, Floor3 };
|
||||||
|
Teleport.BodyEntered += OnTeleportEntered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnTeleportEntered(Node3D body)
|
||||||
|
{
|
||||||
|
GameLogic.Input(new GameLogic.Input.LoadNextFloor());
|
||||||
|
}
|
||||||
|
|
||||||
public void OnResolved()
|
public void OnResolved()
|
||||||
{
|
{
|
||||||
GameBinding = GameLogic.Bind();
|
GameBinding = GameLogic.Bind();
|
||||||
GameBinding
|
GameBinding
|
||||||
.Handle((in GameLogic.Output.StartGame _) => { })
|
.Handle((in GameLogic.Output.StartGame _) =>
|
||||||
.Handle((in GameLogic.Output.SetPauseMode output) => { CallDeferred(nameof(SetPauseMode), output.IsPaused); })
|
{
|
||||||
|
})
|
||||||
|
.Handle((in GameLogic.Output.LoadNextFloor _) =>
|
||||||
|
{
|
||||||
|
SetPauseMode(true);
|
||||||
|
AnimationPlayer.Play("wait_and_load");
|
||||||
|
var currentFloor = Floors.ElementAt(_currentFloor);
|
||||||
|
currentFloor.CallDeferred(MethodName.QueueFree, []);
|
||||||
|
|
||||||
|
})
|
||||||
|
.Handle((in GameLogic.Output.SetPauseMode output) =>
|
||||||
|
{
|
||||||
|
CallDeferred(nameof(SetPauseMode), output.IsPaused);
|
||||||
|
})
|
||||||
.Handle((in GameLogic.Output.SetInventoryMode _) => { InventoryMenu.PopulateItems(_.Inventory); InventoryMenu.Show(); })
|
.Handle((in GameLogic.Output.SetInventoryMode _) => { InventoryMenu.PopulateItems(_.Inventory); InventoryMenu.Show(); })
|
||||||
.Handle((in GameLogic.Output.HideInventory _) => { InventoryMenu.Hide(); InventoryMenu.ClearItems(); })
|
.Handle((in GameLogic.Output.HideInventory _) => { InventoryMenu.Hide(); InventoryMenu.ClearItems(); })
|
||||||
.Handle((in GameLogic.Output.ShowMiniMap _) => { MiniMap.Show(); })
|
.Handle((in GameLogic.Output.ShowMiniMap _) => { MiniMap.Show(); })
|
||||||
@@ -51,10 +91,31 @@ public partial class Game : Node3D, IGame
|
|||||||
GameLogic.Start();
|
GameLogic.Start();
|
||||||
|
|
||||||
GameLogic.Input(new GameLogic.Input.Initialize());
|
GameLogic.Input(new GameLogic.Input.Initialize());
|
||||||
|
AnimationPlayer.AnimationStarted += AnimationPlayer_AnimationStarted;
|
||||||
|
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
|
||||||
|
|
||||||
|
AnimationPlayer.Play("wait_and_load");
|
||||||
|
|
||||||
this.Provide();
|
this.Provide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AnimationPlayer_AnimationStarted(StringName animName)
|
||||||
|
{
|
||||||
|
SetPauseMode(true);
|
||||||
|
|
||||||
|
var newFloor = Floors.ElementAt(_currentFloor + 1);
|
||||||
|
newFloor.CallDeferred(nameof(newFloor.InitializeDungeon), []);
|
||||||
|
newFloor.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AnimationPlayer_AnimationFinished(StringName animName)
|
||||||
|
{
|
||||||
|
var spawnPoints = GetTree().GetNodesInGroup("Exit").OfType<Marker3D>();
|
||||||
|
Teleport.GlobalPosition = spawnPoints.Last().GlobalPosition;
|
||||||
|
_currentFloor++;
|
||||||
|
SetPauseMode(false);
|
||||||
|
}
|
||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
if (Input.IsActionJustPressed(GameInputs.Inventory))
|
if (Input.IsActionJustPressed(GameInputs.Inventory))
|
||||||
|
|||||||
@@ -1,15 +1,72 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://33ek675mfb5n"]
|
[gd_scene load_steps=16 format=3 uid="uid://33ek675mfb5n"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://src/game/Game.cs" id="1_ytcii"]
|
[ext_resource type="Script" path="res://src/game/Game.cs" id="1_ytcii"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="3_kk6ly"]
|
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="3_kk6ly"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dlj8qdg1c5048" path="res://src/inventory_menu/InventoryMenu.tscn" id="4_wk8gw"]
|
[ext_resource type="PackedScene" uid="uid://dlj8qdg1c5048" path="res://src/inventory_menu/InventoryMenu.tscn" id="4_wk8gw"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dvnc26rebk6o0" path="res://src/map/Overworld.tscn" id="5_4hqe8"]
|
[ext_resource type="PackedScene" uid="uid://dvnc26rebk6o0" path="res://src/map/Overworld.tscn" id="5_4hqe8"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://u1e5ae7whhxg" path="res://src/map/dungeon/floors/Floor1.tscn" id="6_75lk5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="6_owlf4"]
|
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="6_owlf4"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b3r0r22kc67bl" path="res://src/map/dungeon/floors/Floor2.tscn" id="7_1sm5s"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b40sstnic41dw" path="res://src/map/dungeon/floors/Floor3.tscn" id="8_87yk1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c3ek5i43cl0r5" path="res://src/map/Teleport.tscn" id="9_nwu7r"]
|
||||||
|
|
||||||
[sub_resource type="Environment" id="Environment_fke5g"]
|
[sub_resource type="Environment" id="Environment_fke5g"]
|
||||||
|
|
||||||
[sub_resource type="NavigationMesh" id="NavigationMesh_xligp"]
|
[sub_resource type="NavigationMesh" id="NavigationMesh_xligp"]
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_wewlr"]
|
||||||
|
resource_name = "load"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("LoadScreen:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0.486275, 1, 1), Color(0, 0.486275, 1, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_nc1gg"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("LoadScreen:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(1, 1, 1, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_ovny8"]
|
||||||
|
resource_name = "wait_and_load"
|
||||||
|
length = 3.0
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("LoadScreen:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1.96667, 2.96667),
|
||||||
|
"transitions": PackedFloat32Array(1, 1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0.486275, 1, 1), Color(0, 0.486275, 1, 1), Color(0, 0.486275, 1, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_opfbx"]
|
||||||
|
_data = {
|
||||||
|
"RESET": SubResource("Animation_nc1gg"),
|
||||||
|
"load": SubResource("Animation_wewlr"),
|
||||||
|
"wait_and_load": SubResource("Animation_ovny8")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="Game" type="Node3D"]
|
[node name="Game" type="Node3D"]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
script = ExtResource("1_ytcii")
|
script = ExtResource("1_ytcii")
|
||||||
@@ -19,7 +76,7 @@ environment = SubResource("Environment_fke5g")
|
|||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource("3_kk6ly")]
|
[node name="Player" parent="." instance=ExtResource("3_kk6ly")]
|
||||||
process_mode = 1
|
process_mode = 1
|
||||||
transform = Transform3D(0.0871905, 0, -0.996192, 0, 1, 0, 0.996192, 0, 0.0871905, -5.335, -4.70883, -0.527107)
|
transform = Transform3D(0.0871905, 0, -0.996192, 0, 1, 0, 0.996192, 0, 0.0871905, -11.0585, -2.7998, -6.0685)
|
||||||
MoveSpeed = 8.0
|
MoveSpeed = 8.0
|
||||||
Acceleration = 4.0
|
Acceleration = 4.0
|
||||||
|
|
||||||
@@ -42,4 +99,39 @@ unique_name_in_owner = true
|
|||||||
navigation_mesh = SubResource("NavigationMesh_xligp")
|
navigation_mesh = SubResource("NavigationMesh_xligp")
|
||||||
|
|
||||||
[node name="Overworld" parent="." instance=ExtResource("5_4hqe8")]
|
[node name="Overworld" parent="." instance=ExtResource("5_4hqe8")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.510071, -5.13176)
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="Floor1" parent="." instance=ExtResource("6_75lk5")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="Floor2" parent="." instance=ExtResource("7_1sm5s")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="Floor3" parent="." instance=ExtResource("8_87yk1")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
libraries = {
|
||||||
|
"": SubResource("AnimationLibrary_opfbx")
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="LoadScreen" type="ColorRect" parent="."]
|
||||||
|
process_mode = 3
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(1, 1, 1, 0)
|
||||||
|
|
||||||
|
[node name="Teleport" parent="." instance=ExtResource("9_nwu7r")]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
process_mode = 3
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 900, 900, 900)
|
||||||
|
disable_mode = 2
|
||||||
|
collision_layer = 2
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
public readonly record struct MiniMapButtonReleased;
|
public readonly record struct MiniMapButtonReleased;
|
||||||
|
|
||||||
public readonly record struct GameOver;
|
public readonly record struct GameOver;
|
||||||
|
|
||||||
|
public readonly record struct LoadNextFloor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ namespace GameJamDungeon
|
|||||||
public readonly record struct HideMiniMap();
|
public readonly record struct HideMiniMap();
|
||||||
|
|
||||||
public readonly record struct GameOver();
|
public readonly record struct GameOver();
|
||||||
|
|
||||||
|
public readonly record struct LoadNextFloor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace GameJamDungeon
|
|||||||
public partial record State
|
public partial record State
|
||||||
{
|
{
|
||||||
[Meta]
|
[Meta]
|
||||||
public partial record Playing : State, IGet<Input.InventoryMenuButtonPressed>, IGet<Input.MiniMapButtonPressed>, IGet<Input.GameOver>
|
public partial record Playing : State, IGet<Input.InventoryMenuButtonPressed>, IGet<Input.MiniMapButtonPressed>, IGet<Input.GameOver>, IGet<Input.LoadNextFloor>
|
||||||
{
|
{
|
||||||
public Playing()
|
public Playing()
|
||||||
{
|
{
|
||||||
@@ -28,6 +28,12 @@ namespace GameJamDungeon
|
|||||||
{
|
{
|
||||||
return To<Quit>();
|
return To<Quit>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Transition On(in Input.LoadNextFloor input)
|
||||||
|
{
|
||||||
|
Output(new Output.LoadNextFloor());
|
||||||
|
return ToSelf();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ Description = ""
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_uavx4"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_uavx4"]
|
||||||
radius = 0.470016
|
radius = 0.470016
|
||||||
height = 0.940032
|
|
||||||
|
|
||||||
[node name="Accessory" type="Node3D"]
|
[node name="Accessory" type="Node3D"]
|
||||||
script = ExtResource("1_jq0hu")
|
script = ExtResource("1_jq0hu")
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://cgoubcl86pib4" path="res://src/items/armor/armor.png" id="1_vpnem"]
|
[ext_resource type="Texture2D" uid="uid://cgoubcl86pib4" path="res://src/items/armor/armor.png" id="1_vpnem"]
|
||||||
[ext_resource type="Resource" uid="uid://chjmkb3aiomvr" path="res://src/items/armor/resources/PatheticCoat.tres" id="2_eftit"]
|
[ext_resource type="Resource" uid="uid://chjmkb3aiomvr" path="res://src/items/armor/resources/PatheticCoat.tres" id="2_eftit"]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1gpxo"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_qdeu2"]
|
||||||
radius = 0.470016
|
size = Vector3(0.778381, 0.929947, 0.731567)
|
||||||
height = 0.940032
|
|
||||||
|
|
||||||
[node name="Armor" type="Node3D"]
|
[node name="Armor" type="Node3D"]
|
||||||
script = ExtResource("1_cmjpq")
|
script = ExtResource("1_cmjpq")
|
||||||
@@ -24,4 +23,5 @@ collision_layer = 4
|
|||||||
collision_mask = 4
|
collision_mask = 4
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
|
||||||
shape = SubResource("CapsuleShape3D_1gpxo")
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0600509, 0.26725, 0.180481)
|
||||||
|
shape = SubResource("BoxShape3D_qdeu2")
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_j2it8"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_j2it8"]
|
||||||
radius = 0.470016
|
radius = 0.470016
|
||||||
height = 0.940032
|
|
||||||
|
|
||||||
[node name="CommonSword" type="Node3D"]
|
[node name="CommonSword" type="Node3D"]
|
||||||
script = ExtResource("1_sr3bh")
|
script = ExtResource("1_sr3bh")
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_4ic28"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_4ic28"]
|
||||||
radius = 0.470016
|
radius = 0.470016
|
||||||
height = 0.940032
|
|
||||||
|
|
||||||
[node name="RareSword" type="Node3D"]
|
[node name="RareSword" type="Node3D"]
|
||||||
script = ExtResource("1_f8v7v")
|
script = ExtResource("1_f8v7v")
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cbafi"]
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cbafi"]
|
||||||
radius = 0.470016
|
radius = 0.470016
|
||||||
height = 0.940032
|
|
||||||
|
|
||||||
[node name="UncommonSword" type="Node3D"]
|
[node name="UncommonSword" type="Node3D"]
|
||||||
script = ExtResource("1_3o4dy")
|
script = ExtResource("1_3o4dy")
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.GodotNodeInterfaces;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using GameJamDungeon;
|
|
||||||
using Godot;
|
|
||||||
using System;
|
|
||||||
|
|
||||||
public interface IOverworld : INode3D;
|
|
||||||
|
|
||||||
[Meta(typeof(IAutoNode))]
|
|
||||||
public partial class Overworld : Node3D
|
|
||||||
{
|
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
|
||||||
|
|
||||||
public IInstantiator Instantiator { get; set; } = default!;
|
|
||||||
|
|
||||||
[Dependency] public IAppRepo AppRepo => this.DependOn<IAppRepo>();
|
|
||||||
|
|
||||||
[Node] public Area3D Teleport { get; set; } = default!;
|
|
||||||
|
|
||||||
private const string FIRST_DUNGEON_PATH = "res://src/map/dungeon/floors/FirstFloor.tscn";
|
|
||||||
|
|
||||||
public void Initialize()
|
|
||||||
{
|
|
||||||
Instantiator = new Instantiator(GetTree());
|
|
||||||
Teleport.BodyEntered += Teleport_BodyEntered;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async void Teleport_BodyEntered(Node3D body)
|
|
||||||
{
|
|
||||||
Instantiator.SceneTree.Paused = true;
|
|
||||||
AppRepo.OnShowLoadingScreen();
|
|
||||||
await ToSignal(GetTree().CreateTimer(2f), "timeout");
|
|
||||||
var dungeon = Instantiator.LoadAndInstantiate<Node3D>(FIRST_DUNGEON_PATH);
|
|
||||||
GetParent().AddChild(dungeon);
|
|
||||||
CallDeferred(MethodName.QueueFree);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnExit()
|
|
||||||
{
|
|
||||||
AppRepo.Dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +1,24 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://dvnc26rebk6o0"]
|
[gd_scene load_steps=3 format=3 uid="uid://dvnc26rebk6o0"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://b6atdgf2e6e2t" path="res://src/items/weapons/models/CommonSword.tscn" id="1_dnrj0"]
|
[ext_resource type="Script" path="res://src/map/dungeon/floors/Overworld.cs" id="1_5hmt3"]
|
||||||
[ext_resource type="Script" path="res://src/map/Overworld.cs" id="1_duf4r"]
|
[ext_resource type="PackedScene" uid="uid://c10nhqq8su6pp" path="res://src/items/weapons/models/RareSword.tscn" id="2_ni2nx"]
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_amchs"]
|
|
||||||
albedo_color = Color(0, 0, 0.211765, 0.164706)
|
|
||||||
|
|
||||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_cduj5"]
|
|
||||||
|
|
||||||
[node name="Overworld" type="Node3D"]
|
[node name="Overworld" type="Node3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63488, -5.13176)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63488, -5.13176)
|
||||||
script = ExtResource("1_duf4r")
|
script = ExtResource("1_5hmt3")
|
||||||
|
|
||||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.82007, 0.766602, -1.46094)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.82007, 0.766602, -1.46094)
|
||||||
flip_faces = true
|
flip_faces = true
|
||||||
size = Vector3(20, 10, 20)
|
size = Vector3(20, 10, 20)
|
||||||
|
|
||||||
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="."]
|
[node name="PlayerSpawnPoint" type="Marker3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3.15009, 0)
|
|
||||||
flip_faces = true
|
|
||||||
material = SubResource("StandardMaterial3D_amchs")
|
|
||||||
|
|
||||||
[node name="Teleport" type="Area3D" parent="CSGCylinder3D"]
|
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
collision_layer = 2
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4, -6)
|
||||||
collision_mask = 2
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="CSGCylinder3D/Teleport"]
|
[node name="ExitSpawnPoint" type="Marker3D" parent="." groups=["Exit"]]
|
||||||
shape = SubResource("CylinderShape3D_cduj5")
|
unique_name_in_owner = true
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.49531, -3.12363, 0)
|
||||||
|
|
||||||
[node name="CommonSword" parent="." instance=ExtResource("1_dnrj0")]
|
[node name="RareSword" parent="." instance=ExtResource("2_ni2nx")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.188, -3.81491)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3.8356, -2.30799)
|
||||||
|
|||||||
18
src/map/Teleport.tscn
Normal file
18
src/map/Teleport.tscn
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://c3ek5i43cl0r5"]
|
||||||
|
|
||||||
|
[sub_resource type="CylinderShape3D" id="CylinderShape3D_vtvx6"]
|
||||||
|
radius = 1.0
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dc1b0"]
|
||||||
|
transparency = 1
|
||||||
|
albedo_color = Color(0, 1, 0, 0.164706)
|
||||||
|
|
||||||
|
[node name="Teleport" type="Area3D"]
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 2
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
shape = SubResource("CylinderShape3D_vtvx6")
|
||||||
|
|
||||||
|
[node name="CSGCylinder3D" type="CSGCylinder3D" parent="."]
|
||||||
|
material = SubResource("StandardMaterial3D_dc1b0")
|
||||||
22
src/map/dungeon/floors/DungeonFloor.cs
Normal file
22
src/map/dungeon/floors/DungeonFloor.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Chickensoft.AutoInject;
|
||||||
|
using Chickensoft.GodotNodeInterfaces;
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
public interface IDungeonFloor : INode3D
|
||||||
|
{
|
||||||
|
void InitializeDungeon();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Meta(typeof(IAutoNode))]
|
||||||
|
public partial class DungeonFloor : Node3D, IDungeonFloor
|
||||||
|
{
|
||||||
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
|
[Node] public GodotObject DungeonGenerator { get; set; } = default!;
|
||||||
|
|
||||||
|
public void InitializeDungeon()
|
||||||
|
{
|
||||||
|
DungeonGenerator.Call("generate");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://u1e5ae7whhxg"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="1_yb2mo"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dhpwwqow1ahrc" path="res://src/map/dungeon/rooms/Room1.tscn" id="2_0kqcj"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bbwgmqy3evhh2" path="res://src/map/dungeon/rooms/Room2.tscn" id="3_6orvx"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/corridor/Corridor.tscn" id="4_4tgqj"]
|
|
||||||
|
|
||||||
[node name="FirstFloor" type="Node3D"]
|
|
||||||
script = ExtResource("1_yb2mo")
|
|
||||||
room_scenes = Array[PackedScene]([ExtResource("2_0kqcj"), ExtResource("3_6orvx")])
|
|
||||||
corridor_room_scene = ExtResource("4_4tgqj")
|
|
||||||
dungeon_size = Vector3i(10, 1, 10)
|
|
||||||
18
src/map/dungeon/floors/Floor1.tscn
Normal file
18
src/map/dungeon/floors/Floor1.tscn
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://u1e5ae7whhxg"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="1_sr15j"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dhpwwqow1ahrc" path="res://src/map/dungeon/rooms/Room1.tscn" id="2_dvdf4"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bbwgmqy3evhh2" path="res://src/map/dungeon/rooms/Room2.tscn" id="3_462ob"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/corridor/Corridor.tscn" id="4_pgrs5"]
|
||||||
|
[ext_resource type="Script" path="res://src/map/dungeon/floors/DungeonFloor.cs" id="5_bsukb"]
|
||||||
|
|
||||||
|
[node name="Floor1" type="Node3D"]
|
||||||
|
script = ExtResource("5_bsukb")
|
||||||
|
|
||||||
|
[node name="DungeonGenerator" type="Node3D" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
script = ExtResource("1_sr15j")
|
||||||
|
room_scenes = Array[PackedScene]([ExtResource("2_dvdf4"), ExtResource("3_462ob")])
|
||||||
|
corridor_room_scene = ExtResource("4_pgrs5")
|
||||||
|
dungeon_size = Vector3i(10, 1, 10)
|
||||||
|
generate_on_ready = false
|
||||||
18
src/map/dungeon/floors/Floor2.tscn
Normal file
18
src/map/dungeon/floors/Floor2.tscn
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://b3r0r22kc67bl"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="1_afeds"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dhpwwqow1ahrc" path="res://src/map/dungeon/rooms/Room1.tscn" id="2_dss74"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bbwgmqy3evhh2" path="res://src/map/dungeon/rooms/Room2.tscn" id="3_5748f"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/corridor/Corridor.tscn" id="4_mebix"]
|
||||||
|
[ext_resource type="Script" path="res://src/map/dungeon/floors/DungeonFloor.cs" id="5_ld0kt"]
|
||||||
|
|
||||||
|
[node name="Floor2" type="Node3D"]
|
||||||
|
script = ExtResource("5_ld0kt")
|
||||||
|
|
||||||
|
[node name="DungeonGenerator" type="Node3D" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
script = ExtResource("1_afeds")
|
||||||
|
room_scenes = Array[PackedScene]([ExtResource("2_dss74"), ExtResource("3_5748f")])
|
||||||
|
corridor_room_scene = ExtResource("4_mebix")
|
||||||
|
dungeon_size = Vector3i(10, 1, 10)
|
||||||
|
generate_on_ready = false
|
||||||
18
src/map/dungeon/floors/Floor3.tscn
Normal file
18
src/map/dungeon/floors/Floor3.tscn
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://b40sstnic41dw"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="1_ou8lo"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dhpwwqow1ahrc" path="res://src/map/dungeon/rooms/Room1.tscn" id="2_8mwqw"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bbwgmqy3evhh2" path="res://src/map/dungeon/rooms/Room2.tscn" id="3_ap5wj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/corridor/Corridor.tscn" id="4_1741m"]
|
||||||
|
[ext_resource type="Script" path="res://src/map/dungeon/floors/DungeonFloor.cs" id="5_mo2td"]
|
||||||
|
|
||||||
|
[node name="Floor3" type="Node3D"]
|
||||||
|
script = ExtResource("5_mo2td")
|
||||||
|
|
||||||
|
[node name="DungeonGenerator" type="Node3D" parent="."]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
script = ExtResource("1_ou8lo")
|
||||||
|
room_scenes = Array[PackedScene]([ExtResource("2_8mwqw"), ExtResource("3_ap5wj")])
|
||||||
|
corridor_room_scene = ExtResource("4_1741m")
|
||||||
|
dungeon_size = Vector3i(10, 1, 10)
|
||||||
|
generate_on_ready = false
|
||||||
14
src/map/dungeon/floors/Overworld.cs
Normal file
14
src/map/dungeon/floors/Overworld.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using Chickensoft.AutoInject;
|
||||||
|
using Chickensoft.Introspection;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
[Meta(typeof(IAutoNode))]
|
||||||
|
public partial class Overworld : Node3D, IDungeonFloor
|
||||||
|
{
|
||||||
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
|
public void InitializeDungeon()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,6 @@ using Chickensoft.GodotNodeInterfaces;
|
|||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using GameJamDungeon;
|
using GameJamDungeon;
|
||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
|
||||||
|
|
||||||
public interface IDungeonRoom : INode3D
|
public interface IDungeonRoom : INode3D
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,15 +1,11 @@
|
|||||||
[gd_scene load_steps=19 format=3 uid="uid://dhpwwqow1ahrc"]
|
[gd_scene load_steps=15 format=3 uid="uid://dhpwwqow1ahrc"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_0tfda"]
|
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_0tfda"]
|
||||||
[ext_resource type="Script" path="res://src/map/dungeon/rooms/DungeonRoom.cs" id="1_ti7ur"]
|
[ext_resource type="Script" path="res://src/map/dungeon/rooms/DungeonRoom.cs" id="1_ti7ur"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ckaw6wjmi0fom" path="res://src/map/dungeon/door/Door.tscn" id="2_mdawx"]
|
[ext_resource type="PackedScene" uid="uid://ckaw6wjmi0fom" path="res://src/map/dungeon/door/Door.tscn" id="2_mdawx"]
|
||||||
[ext_resource type="PackedScene" uid="uid://twrj4wixcbu7" path="res://src/items/ItemDatabase.tscn" id="4_2mnb7"]
|
[ext_resource type="PackedScene" uid="uid://twrj4wixcbu7" path="res://src/items/ItemDatabase.tscn" id="4_2mnb7"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b6atdgf2e6e2t" path="res://src/items/weapons/models/CommonSword.tscn" id="4_chdi8"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="5_owpbq"]
|
[ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="5_owpbq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cbb1fxllrnlyr" path="res://src/items/weapons/models/UncommonSword.tscn" id="5_viqv4"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c10nhqq8su6pp" path="res://src/items/weapons/models/RareSword.tscn" id="6_c8gn4"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dorr7v1tkeiy0" path="res://src/items/armor/Armor.tscn" id="7_bm50w"]
|
[ext_resource type="PackedScene" uid="uid://dorr7v1tkeiy0" path="res://src/items/armor/Armor.tscn" id="7_bm50w"]
|
||||||
[ext_resource type="PackedScene" uid="uid://1bbmod6680c2" path="res://src/items/accessory/Accessory.tscn" id="8_1psf1"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://d4l4qutp8x40c" path="res://src/npc/goddess/Goddess.tscn" id="10_82rsb"]
|
[ext_resource type="PackedScene" uid="uid://d4l4qutp8x40c" path="res://src/npc/goddess/Goddess.tscn" id="10_82rsb"]
|
||||||
|
|
||||||
[sub_resource type="PlaneMesh" id="PlaneMesh_luhnj"]
|
[sub_resource type="PlaneMesh" id="PlaneMesh_luhnj"]
|
||||||
@@ -36,7 +32,7 @@ agent_radius = 0.15
|
|||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_4exnc"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_4exnc"]
|
||||||
size = Vector3(3.00739, 1, 10.7051)
|
size = Vector3(3.00739, 1, 10.7051)
|
||||||
|
|
||||||
[node name="DungeonRoom3D" type="Node3D"]
|
[node name="Room1" type="Node3D"]
|
||||||
script = ExtResource("1_0tfda")
|
script = ExtResource("1_0tfda")
|
||||||
|
|
||||||
[node name="DungeonRoom" type="Node3D" parent="."]
|
[node name="DungeonRoom" type="Node3D" parent="."]
|
||||||
@@ -55,7 +51,7 @@ mesh = SubResource("PlaneMesh_luhnj")
|
|||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|
||||||
[node name="ItemSpawn1" type="Marker3D" parent="ItemSpawnPoints"]
|
[node name="ItemSpawn1" type="Marker3D" parent="ItemSpawnPoints"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.54295, -4.15788, -2.92704)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.83448, -4.15788, -2.92704)
|
||||||
gizmo_extents = 1.0
|
gizmo_extents = 1.0
|
||||||
|
|
||||||
[node name="EnemySpawnPoints" type="Node3D" parent="."]
|
[node name="EnemySpawnPoints" type="Node3D" parent="."]
|
||||||
@@ -66,8 +62,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.053, -3, 0)
|
|||||||
|
|
||||||
[node name="ItemDatabase" parent="." instance=ExtResource("4_2mnb7")]
|
[node name="ItemDatabase" parent="." instance=ExtResource("4_2mnb7")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
ItemScene = Array[PackedScene]([ExtResource("7_bm50w"), ExtResource("4_chdi8"), ExtResource("5_viqv4"), ExtResource("6_c8gn4"), ExtResource("8_1psf1")])
|
ItemScene = Array[PackedScene]([ExtResource("7_bm50w")])
|
||||||
DropRate = PackedFloat32Array(0.25, 0.25, 0.25, 0.25, 0.25)
|
DropRate = PackedFloat32Array(1)
|
||||||
|
|
||||||
[node name="EnemyDatabase" parent="." instance=ExtResource("5_owpbq")]
|
[node name="EnemyDatabase" parent="." instance=ExtResource("5_owpbq")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
@@ -105,3 +101,6 @@ shape = SubResource("BoxShape3D_4exnc")
|
|||||||
|
|
||||||
[node name="Goddess" parent="." instance=ExtResource("10_82rsb")]
|
[node name="Goddess" parent="." instance=ExtResource("10_82rsb")]
|
||||||
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, -3.23054, -3.37962, 2.05892)
|
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, -3.23054, -3.37962, 2.05892)
|
||||||
|
|
||||||
|
[node name="ExitSpawnLocation" type="Marker3D" parent="." groups=["Exit"]]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.06499, -3.26251, -2.72249)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=19 format=3 uid="uid://bbwgmqy3evhh2"]
|
[gd_scene load_steps=18 format=3 uid="uid://bbwgmqy3evhh2"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_o02dd"]
|
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_o02dd"]
|
||||||
[ext_resource type="Script" path="res://src/map/dungeon/rooms/DungeonRoom.cs" id="2_jrlll"]
|
[ext_resource type="Script" path="res://src/map/dungeon/rooms/DungeonRoom.cs" id="2_jrlll"]
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://ckaw6wjmi0fom" path="res://src/map/dungeon/door/Door.tscn" id="4_nh0nj"]
|
[ext_resource type="PackedScene" uid="uid://ckaw6wjmi0fom" path="res://src/map/dungeon/door/Door.tscn" id="4_nh0nj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b6atdgf2e6e2t" path="res://src/items/weapons/models/CommonSword.tscn" id="4_wqpwj"]
|
[ext_resource type="PackedScene" uid="uid://b6atdgf2e6e2t" path="res://src/items/weapons/models/CommonSword.tscn" id="4_wqpwj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="5_fabiq"]
|
[ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="5_fabiq"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cbb1fxllrnlyr" path="res://src/items/weapons/models/UncommonSword.tscn" id="6_hb3sb"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c10nhqq8su6pp" path="res://src/items/weapons/models/RareSword.tscn" id="7_c5lye"]
|
[ext_resource type="PackedScene" uid="uid://c10nhqq8su6pp" path="res://src/items/weapons/models/RareSword.tscn" id="7_c5lye"]
|
||||||
[ext_resource type="PackedScene" uid="uid://1bbmod6680c2" path="res://src/items/accessory/Accessory.tscn" id="8_1fvbo"]
|
[ext_resource type="PackedScene" uid="uid://1bbmod6680c2" path="res://src/items/accessory/Accessory.tscn" id="8_1fvbo"]
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ size = Vector3(3, 1, 50)
|
|||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_q0wqs"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_q0wqs"]
|
||||||
size = Vector3(7, 1, 47)
|
size = Vector3(7, 1, 47)
|
||||||
|
|
||||||
[node name="DungeonRoom3D" type="Node3D"]
|
[node name="Room2" type="Node3D"]
|
||||||
script = ExtResource("1_o02dd")
|
script = ExtResource("1_o02dd")
|
||||||
size_in_voxels = Vector3i(5, 1, 1)
|
size_in_voxels = Vector3i(5, 1, 1)
|
||||||
|
|
||||||
@@ -81,8 +80,8 @@ mesh = SubResource("PlaneMesh_j8q3j")
|
|||||||
|
|
||||||
[node name="ItemDatabase" parent="." instance=ExtResource("4_c51bx")]
|
[node name="ItemDatabase" parent="." instance=ExtResource("4_c51bx")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
ItemScene = Array[PackedScene]([ExtResource("4_2bf0o"), ExtResource("4_wqpwj"), ExtResource("6_hb3sb"), ExtResource("7_c5lye"), ExtResource("8_1fvbo")])
|
ItemScene = Array[PackedScene]([ExtResource("8_1fvbo"), ExtResource("4_2bf0o"), ExtResource("7_c5lye"), ExtResource("4_wqpwj")])
|
||||||
DropRate = PackedFloat32Array(0.25, 0.25, 0.25, 0.25, 0.25)
|
DropRate = PackedFloat32Array(0.25, 0.25, 0.25, 0.25)
|
||||||
|
|
||||||
[node name="EnemyDatabase" parent="." instance=ExtResource("5_fabiq")]
|
[node name="EnemyDatabase" parent="." instance=ExtResource("5_fabiq")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@@ -136,10 +136,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.937567, 0)
|
|||||||
shape = SubResource("CapsuleShape3D_dw45s")
|
shape = SubResource("CapsuleShape3D_dw45s")
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="CollisionShape3D"]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="CollisionShape3D"]
|
||||||
|
visible = false
|
||||||
mesh = SubResource("CapsuleMesh_dmans")
|
mesh = SubResource("CapsuleMesh_dmans")
|
||||||
|
|
||||||
[node name="Camera3D" type="Camera3D" parent="."]
|
[node name="Camera3D" type="Camera3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.36136, -0.472795)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.36136, 0.0347929)
|
||||||
cull_mask = 1048573
|
cull_mask = 1048573
|
||||||
|
|
||||||
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
||||||
|
|||||||
Reference in New Issue
Block a user