Make basic overworld and teleport to first dungeon floor

This commit is contained in:
2024-09-07 03:31:42 -07:00
parent 98d096303c
commit 3665150342
10 changed files with 141 additions and 102 deletions

View File

@@ -28,6 +28,9 @@ public partial class Game : Node3D, IGame
[Node] public NavigationRegion3D NavigationRegion { get; set; } = default!;
public const string SECOND_FLOOR_PATH = "res://src/map/dungeon/floors/SecondFloor.tscn";
public const string THIRD_FLOOR_PATH = "res://src/map/dungeon/floors/ThirdFloor.tscn";
public void Setup()
{
GameRepo = new GameRepo();

View File

@@ -1,21 +1,10 @@
[gd_scene load_steps=13 format=3 uid="uid://33ek675mfb5n"]
[gd_scene load_steps=7 format=3 uid="uid://33ek675mfb5n"]
[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://dlj8qdg1c5048" path="res://src/inventory_menu/InventoryMenu.tscn" id="4_wk8gw"]
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="5_fqkhg"]
[ext_resource type="PackedScene" uid="uid://dhpwwqow1ahrc" path="res://src/map/dungeon/rooms/Room1.tscn" id="6_04w8n"]
[ext_resource type="PackedScene" uid="uid://sv0suc4tjk8h" path="res://src/map/Overworld.tscn" id="5_cx613"]
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="6_owlf4"]
[ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/corridor/Corridor.tscn" id="6_swtay"]
[ext_resource type="PackedScene" uid="uid://bbwgmqy3evhh2" path="res://src/map/dungeon/rooms/Room2.tscn" id="7_1ynbc"]
[sub_resource type="Environment" id="Environment_fke5g"]
[sub_resource type="PlaneMesh" id="PlaneMesh_atd5i"]
size = Vector2(10, 10)
[sub_resource type="BoxShape3D" id="BoxShape3D_s2hwi"]
size = Vector3(10, 1, 10)
[sub_resource type="NavigationMesh" id="NavigationMesh_xligp"]
@@ -23,25 +12,12 @@ size = Vector3(10, 1, 10)
process_mode = 3
script = ExtResource("1_ytcii")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_fke5g")
[node name="Player" parent="." instance=ExtResource("3_kk6ly")]
process_mode = 1
transform = Transform3D(0.0871905, 0, -0.996192, 0, 1, 0, 0.996192, 0, 0.0871905, -71.4241, -4.70883, -0.527107)
transform = Transform3D(0.0871905, 0, -0.996192, 0, 1, 0, 0.996192, 0, 0.0871905, 0.81955, 0.00648284, -0.527107)
MoveSpeed = 8.0
Acceleration = 4.0
[node name="RigidBody3D" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -69.9907, -4.96505, 0)
[node name="MeshInstance3D" type="MeshInstance3D" parent="RigidBody3D"]
mesh = SubResource("PlaneMesh_atd5i")
[node name="CollisionShape3D" type="CollisionShape3D" parent="RigidBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.498463, 0)
shape = SubResource("BoxShape3D_s2hwi")
[node name="MiniMap" parent="." instance=ExtResource("6_owlf4")]
unique_name_in_owner = true
visible = false
@@ -60,73 +36,4 @@ omni_attenuation = -0.183
unique_name_in_owner = true
navigation_mesh = SubResource("NavigationMesh_xligp")
[node name="DungeonGenerator3D" type="Node3D" parent="."]
script = ExtResource("5_fqkhg")
room_scenes = Array[PackedScene]([ExtResource("6_04w8n"), ExtResource("7_1ynbc")])
corridor_room_scene = ExtResource("6_swtay")
dungeon_size = Vector3i(10, 1, 10)
[node name="RoomsContainer" type="Node3D" parent="DungeonGenerator3D"]
[node name="DungeonRoom3D_0" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("7_1ynbc")]
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, -35, 0, -5)
[node name="DungeonRoom3D_1" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_04w8n")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, -35)
[node name="DungeonRoom3D_2" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_04w8n")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -5, 0, 5)
[node name="DungeonRoom3D_3" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("7_1ynbc")]
transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, -25, 0, -15)
[node name="Corridor_4" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -35, 0, -35)
[node name="Corridor_5" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -35, 0, -45)
[node name="Corridor_6" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25, 0, -45)
[node name="Corridor_7" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15, 0, -45)
[node name="Corridor_8" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 0, -45)
[node name="Corridor_9" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, -45)
[node name="Corridor_10" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, -45)
[node name="Corridor_11" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, -25)
[node name="Corridor_12" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, -15)
[node name="Corridor_13" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, -5)
[node name="Corridor_14" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, -5)
[node name="Corridor_15" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 0, 5)
[node name="Corridor_16" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -35, 0, 25)
[node name="Corridor_17" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25, 0, 25)
[node name="Corridor_18" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25, 0, 15)
[node name="Corridor_19" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15, 0, 5)
[node name="Corridor_20" parent="DungeonGenerator3D/RoomsContainer" instance=ExtResource("6_swtay")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -15, 0, 15)
[node name="Overworld" parent="." instance=ExtResource("5_cx613")]