Floor 0 stuff

This commit is contained in:
2024-10-10 23:05:30 -07:00
parent 6d29e41f3a
commit 9bbceba973
12 changed files with 745 additions and 643 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.4.0-dev.3"> <Project Sdk="Godot.NET.Sdk/4.4.0-dev.1">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net8.0</TargetFramework> <TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net8.0</TargetFramework>

View File

@@ -0,0 +1,37 @@
<Project Sdk="Godot.NET.Sdk/4.4.0-dev.3">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'android' ">net8.0</TargetFramework>
<TargetFramework Condition=" '$(GodotTargetPlatform)' == 'ios' ">net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Chickensoft.AutoInject" Version="2.3.0" />
<PackageReference Include="Chickensoft.GodotNodeInterfaces" Version="2.2.23" />
<PackageReference Include="Chickensoft.Introspection.Generator" Version="1.7.0" />
<PackageReference Include="Chickensoft.LogicBlocks" Version="5.6.0" />
<PackageReference Include="Chickensoft.LogicBlocks.DiagramGenerator" Version="5.6.0" />
<PackageReference Include="Chickensoft.SaveFileBuilder" Version="1.1.0" />
<PackageReference Include="GodotSharp.SourceGenerators" Version="2.4.0" />
<PackageReference Include="SSH.NET" Version="2024.1.0" />
<PackageReference Include="System.IO.Abstractions" Version="21.0.29" />
<PackageReference Include="Zeroconf" Version="3.6.11" />
</ItemGroup>
<ItemGroup>
<Folder Include="src\items\weapons\models\" />
<Folder Include="src\map\dungeon\corridor\" />
<Folder Include="src\ui\dialogue\" />
</ItemGroup>
<ItemGroup>
<None Include=".editorconfig" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Godot.SourceGenerators" Version="4.4.0-dev.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="GodotSharp" Version="4.4.0-dev.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="GodotSharpEditor" Version="4.4.0-dev.2" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,4 @@
[gd_resource type="StandardMaterial3D" format=3 uid="uid://brwu51ylevbmg"] [gd_resource type="StandardMaterial3D" format=3 uid="uid://brwu51ylevbmg"]
[resource] [resource]
albedo_color = Color(1, 0, 0, 0) albedo_color = Color(1, 0, 0, 1)

View File

@@ -215,6 +215,34 @@ states/Walk/position = Vector2(551, 257)
transitions = ["Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_g8bck"), "Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_8uvjf"), "SecondaryAttack", "Walk", SubResource("AnimationNodeStateMachineTransition_5o2o7"), "Walk", "SecondaryAttack", SubResource("AnimationNodeStateMachineTransition_tmxut"), "Idle", "SecondaryAttack", SubResource("AnimationNodeStateMachineTransition_0lu76"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_c0ssq"), "Walk", "PrimaryAttack", SubResource("AnimationNodeStateMachineTransition_yfrex"), "Idle", "PrimaryAttack", SubResource("AnimationNodeStateMachineTransition_8v83y"), "PrimaryAttack", "Idle", SubResource("AnimationNodeStateMachineTransition_m6j3e"), "SecondaryAttack", "Idle", SubResource("AnimationNodeStateMachineTransition_3x2rh")] transitions = ["Idle", "Walk", SubResource("AnimationNodeStateMachineTransition_g8bck"), "Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_8uvjf"), "SecondaryAttack", "Walk", SubResource("AnimationNodeStateMachineTransition_5o2o7"), "Walk", "SecondaryAttack", SubResource("AnimationNodeStateMachineTransition_tmxut"), "Idle", "SecondaryAttack", SubResource("AnimationNodeStateMachineTransition_0lu76"), "Start", "Idle", SubResource("AnimationNodeStateMachineTransition_c0ssq"), "Walk", "PrimaryAttack", SubResource("AnimationNodeStateMachineTransition_yfrex"), "Idle", "PrimaryAttack", SubResource("AnimationNodeStateMachineTransition_8v83y"), "PrimaryAttack", "Idle", SubResource("AnimationNodeStateMachineTransition_m6j3e"), "SecondaryAttack", "Idle", SubResource("AnimationNodeStateMachineTransition_3x2rh")]
graph_offset = Vector2(59, 6.52466) graph_offset = Vector2(59, 6.52466)
[sub_resource type="Animation" id="Animation_o4lik"]
resource_name = "Defeated"
step = 0.0833333
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Armature/Skeleton3D/Cube_035:transparency")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Armature/Skeleton3D/Cube_035:material_override")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_hub8w")]
}
[sub_resource type="Animation" id="Animation_g7bmo"] [sub_resource type="Animation" id="Animation_g7bmo"]
resource_name = "Hit" resource_name = "Hit"
length = 0.250008 length = 0.250008
@@ -271,39 +299,11 @@ tracks/1/keys = {
"values": [null] "values": [null]
} }
[sub_resource type="Animation" id="Animation_o4lik"]
resource_name = "Defeated"
step = 0.0833333
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Armature/Skeleton3D/Cube_035:transparency")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [0.0, 1.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Armature/Skeleton3D/Cube_035:material_override")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [ExtResource("3_hub8w")]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_q1mdo"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_q1mdo"]
_data = { _data = {
&"Hit": SubResource("Animation_g7bmo"), "Defeated": SubResource("Animation_o4lik"),
&"RESET": SubResource("Animation_kml6n"), "Hit": SubResource("Animation_g7bmo"),
&"Defeated": SubResource("Animation_o4lik") "RESET": SubResource("Animation_kml6n")
} }
[sub_resource type="BoxShape3D" id="BoxShape3D_hcxtl"] [sub_resource type="BoxShape3D" id="BoxShape3D_hcxtl"]
@@ -327,7 +327,7 @@ bones/0/name = "spine1"
bones/0/parent = -1 bones/0/parent = -1
bones/0/rest = Transform3D(1.49012e-06, 0.00846654, -0.999964, 2.93367e-08, 0.999964, 0.00846654, 1, -4.23752e-08, 1.49012e-06, 0.000155807, -0.00105953, -2.01735) bones/0/rest = Transform3D(1.49012e-06, 0.00846654, -0.999964, 2.93367e-08, 0.999964, 0.00846654, 1, -4.23752e-08, 1.49012e-06, 0.000155807, -0.00105953, -2.01735)
bones/0/enabled = true bones/0/enabled = true
bones/0/position = Vector3(-0.259293, -0.9415, -1.97527) bones/0/position = Vector3(-0.260202, -1.04547, -1.96826)
bones/0/rotation = Quaternion(0.0915277, -0.692111, -0.0341586, 0.715149) bones/0/rotation = Quaternion(0.0915277, -0.692111, -0.0341586, 0.715149)
bones/0/scale = Vector3(1, 1, 1) bones/0/scale = Vector3(1, 1, 1)
bones/1/name = "spine0" bones/1/name = "spine0"
@@ -370,7 +370,7 @@ bones/6/parent = 5
bones/6/rest = Transform3D(0.0598389, 0.98531, 0.15995, -0.975271, 0.0235553, 0.219755, 0.212759, -0.169144, 0.962353, 3.65078e-07, 1.40318, 0) bones/6/rest = Transform3D(0.0598389, 0.98531, 0.15995, -0.975271, 0.0235553, 0.219755, 0.212759, -0.169144, 0.962353, 3.65078e-07, 1.40318, 0)
bones/6/enabled = true bones/6/enabled = true
bones/6/position = Vector3(3.65078e-07, 1.40318, 0) bones/6/position = Vector3(3.65078e-07, 1.40318, 0)
bones/6/rotation = Quaternion(-0.0775798, -0.305162, -0.744802, 0.588326) bones/6/rotation = Quaternion(-0.0475432, -0.294218, -0.744152, 0.59784)
bones/6/scale = Vector3(1, 1, 1) bones/6/scale = Vector3(1, 1, 1)
bones/7/name = "Bone.007" bones/7/name = "Bone.007"
bones/7/parent = 6 bones/7/parent = 6
@@ -405,7 +405,7 @@ bones/11/parent = 1
bones/11/rest = Transform3D(0.981457, 0.0769315, -0.175568, 0.18837, -0.217537, 0.957703, 0.035485, -0.973015, -0.227995, -1.09896e-07, 3.84743, -2.10479e-07) bones/11/rest = Transform3D(0.981457, 0.0769315, -0.175568, 0.18837, -0.217537, 0.957703, 0.035485, -0.973015, -0.227995, -1.09896e-07, 3.84743, -2.10479e-07)
bones/11/enabled = true bones/11/enabled = true
bones/11/position = Vector3(-1.09896e-07, 3.84743, -2.10479e-07) bones/11/position = Vector3(-1.09896e-07, 3.84743, -2.10479e-07)
bones/11/rotation = Quaternion(-0.785983, -0.0627684, 0.0692775, 0.61114) bones/11/rotation = Quaternion(-0.779914, -0.0574383, 0.0814382, 0.617902)
bones/11/scale = Vector3(1, 0.999999, 1) bones/11/scale = Vector3(1, 0.999999, 1)
bones/12/name = "arm2_L" bones/12/name = "arm2_L"
bones/12/parent = 11 bones/12/parent = 11
@@ -433,7 +433,7 @@ bones/15/parent = 1
bones/15/rest = Transform3D(-0.98213, 0.0512573, -0.181089, -0.187541, -0.185921, 0.964501, 0.0157694, 0.981227, 0.192212, 0.00107862, 3.8461, -0.0821097) bones/15/rest = Transform3D(-0.98213, 0.0512573, -0.181089, -0.187541, -0.185921, 0.964501, 0.0157694, 0.981227, 0.192212, 0.00107862, 3.8461, -0.0821097)
bones/15/enabled = true bones/15/enabled = true
bones/15/position = Vector3(0.00107886, 3.8461, -0.0821095) bones/15/position = Vector3(0.00107886, 3.8461, -0.0821095)
bones/15/rotation = Quaternion(-0.209446, 0.735953, 0.623668, -0.159823) bones/15/rotation = Quaternion(-0.215121, 0.74481, 0.614114, -0.1478)
bones/15/scale = Vector3(1, 1, 1) bones/15/scale = Vector3(1, 1, 1)
bones/16/name = "arm2_R" bones/16/name = "arm2_R"
bones/16/parent = 15 bones/16/parent = 15
@@ -460,22 +460,22 @@ bones/19/name = "hip_L"
bones/19/parent = -1 bones/19/parent = -1
bones/19/rest = Transform3D(0.138486, 0.897208, 0.419333, -0.129033, -0.403458, 0.905854, 0.981923, -0.179556, 0.059896, 0.000155807, -0.00105953, -2.01735) bones/19/rest = Transform3D(0.138486, 0.897208, 0.419333, -0.129033, -0.403458, 0.905854, 0.981923, -0.179556, 0.059896, 0.000155807, -0.00105953, -2.01735)
bones/19/enabled = true bones/19/enabled = true
bones/19/position = Vector3(-0.291048, -1.11479, -2.01443) bones/19/position = Vector3(-0.374785, -1.194, -1.73853)
bones/19/rotation = Quaternion(0.608889, 0.315283, 0.575225, -0.446057) bones/19/rotation = Quaternion(0.626407, 0.294406, 0.547288, -0.470548)
bones/19/scale = Vector3(1, 1, 1) bones/19/scale = Vector3(1, 1, 1)
bones/20/name = "leg1_L" bones/20/name = "leg1_L"
bones/20/parent = 19 bones/20/parent = 19
bones/20/rest = Transform3D(0.945603, 0.113405, 0.304916, -0.324072, 0.410457, 0.852351, -0.0284943, -0.9048, 0.424881, 2.08616e-07, 2.00996, -7.1153e-07) bones/20/rest = Transform3D(0.945603, 0.113405, 0.304916, -0.324072, 0.410457, 0.852351, -0.0284943, -0.9048, 0.424881, 2.08616e-07, 2.00996, -7.1153e-07)
bones/20/enabled = true bones/20/enabled = true
bones/20/position = Vector3(2.08616e-07, 2.00996, -7.1153e-07) bones/20/position = Vector3(2.08616e-07, 2.00996, -7.1153e-07)
bones/20/rotation = Quaternion(-0.308277, -0.444276, -0.268297, 0.797246) bones/20/rotation = Quaternion(-0.326486, -0.424244, -0.298458, 0.790156)
bones/20/scale = Vector3(1, 0.999999, 1) bones/20/scale = Vector3(1, 0.999999, 1)
bones/21/name = "leg2_L" bones/21/name = "leg2_L"
bones/21/parent = 20 bones/21/parent = 20
bones/21/rest = Transform3D(0.990336, -0.138679, 0.00180777, 0.138628, 0.990193, 0.0173138, -0.00419111, -0.0168959, 0.999848, 5.96046e-08, 5.85994, -5.23403e-07) bones/21/rest = Transform3D(0.990336, -0.138679, 0.00180777, 0.138628, 0.990193, 0.0173138, -0.00419111, -0.0168959, 0.999848, 5.96046e-08, 5.85994, -5.23403e-07)
bones/21/enabled = true bones/21/enabled = true
bones/21/position = Vector3(5.96046e-08, 5.85994, -5.23403e-07) bones/21/position = Vector3(5.96046e-08, 5.85994, -5.23403e-07)
bones/21/rotation = Quaternion(-0.0600648, 0.00130131, 0.486228, 0.871764) bones/21/rotation = Quaternion(-0.0604731, 0.00129853, 0.489531, 0.869885)
bones/21/scale = Vector3(1, 1, 1) bones/21/scale = Vector3(1, 1, 1)
bones/22/name = "foot1_L" bones/22/name = "foot1_L"
bones/22/parent = 21 bones/22/parent = 21
@@ -509,7 +509,7 @@ bones/26/name = "hip_R"
bones/26/parent = -1 bones/26/parent = -1
bones/26/rest = Transform3D(0.138486, -0.897208, -0.419333, 0.129033, -0.403458, 0.905854, -0.981923, -0.179556, 0.059896, -0.000155807, -0.00105953, -2.01735) bones/26/rest = Transform3D(0.138486, -0.897208, -0.419333, 0.129033, -0.403458, 0.905854, -0.981923, -0.179556, 0.059896, -0.000155807, -0.00105953, -2.01735)
bones/26/enabled = true bones/26/enabled = true
bones/26/position = Vector3(-0.287872, -1.11395, -2.01737) bones/26/position = Vector3(-0.0417459, -1.11395, -2.01905)
bones/26/rotation = Quaternion(0.608697, -0.3155, -0.575514, -0.445793) bones/26/rotation = Quaternion(0.608697, -0.3155, -0.575514, -0.445793)
bones/26/scale = Vector3(1, 1, 1) bones/26/scale = Vector3(1, 1, 1)
bones/27/name = "leg1_R" bones/27/name = "leg1_R"
@@ -517,14 +517,14 @@ bones/27/parent = 26
bones/27/rest = Transform3D(0.945603, -0.113405, -0.304916, 0.324072, 0.410457, 0.852351, 0.0284943, -0.9048, 0.424881, -9.54606e-09, 2.00996, -3.52971e-07) bones/27/rest = Transform3D(0.945603, -0.113405, -0.304916, 0.324072, 0.410457, 0.852351, 0.0284943, -0.9048, 0.424881, -9.54606e-09, 2.00996, -3.52971e-07)
bones/27/enabled = true bones/27/enabled = true
bones/27/position = Vector3(-9.54606e-09, 2.00996, -3.52971e-07) bones/27/position = Vector3(-9.54606e-09, 2.00996, -3.52971e-07)
bones/27/rotation = Quaternion(-0.209211, 0.42082, 0.1429, 0.871046) bones/27/rotation = Quaternion(-0.202464, 0.424548, 0.138115, 0.871603)
bones/27/scale = Vector3(1, 0.999999, 1) bones/27/scale = Vector3(1, 0.999999, 1)
bones/28/name = "leg2_R" bones/28/name = "leg2_R"
bones/28/parent = 27 bones/28/parent = 27
bones/28/rest = Transform3D(0.990336, 0.138679, -0.00180777, -0.138628, 0.990193, 0.0173138, 0.00419111, -0.0168959, 0.999848, 4.51691e-08, 5.85994, -3.72529e-09) bones/28/rest = Transform3D(0.990336, 0.138679, -0.00180777, -0.138628, 0.990193, 0.0173138, 0.00419111, -0.0168959, 0.999848, 4.51691e-08, 5.85994, -3.72529e-09)
bones/28/enabled = true bones/28/enabled = true
bones/28/position = Vector3(4.51691e-08, 5.85994, -3.72529e-09) bones/28/position = Vector3(4.51691e-08, 5.85994, -3.72529e-09)
bones/28/rotation = Quaternion(-0.0643528, -0.00115432, -0.513787, 0.8555) bones/28/rotation = Quaternion(-0.0628203, -0.00116421, -0.501551, 0.862843)
bones/28/scale = Vector3(1, 1, 1) bones/28/scale = Vector3(1, 1, 1)
bones/29/name = "foot1_R" bones/29/name = "foot1_R"
bones/29/parent = 28 bones/29/parent = 28
@@ -556,7 +556,7 @@ bones/32/rotation = Quaternion(0.456756, 0.539878, -0.539587, -0.456893)
bones/32/scale = Vector3(1, 1, 1) bones/32/scale = Vector3(1, 1, 1)
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"] [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"]
transform = Transform3D(-0.3007, -0.0897581, -0.949486, -0.328123, -0.925049, 0.191364, -0.895496, 0.369091, 0.24871, -1.65841, 8.32593, 4.94602) transform = Transform3D(-0.266304, -0.0360179, -0.963216, -0.333717, -0.934053, 0.127191, -0.904275, 0.355314, 0.236722, -1.68937, 8.20828, 4.95637)
bone_name = "TOP OF SKULL" bone_name = "TOP OF SKULL"
bone_idx = 8 bone_idx = 8
@@ -573,7 +573,7 @@ skin = SubResource("Skin_e330f")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = { libraries = {
&"": ExtResource("4_4vicn") "": ExtResource("4_4vicn")
} }
[node name="AnimationTree" type="AnimationTree" parent="."] [node name="AnimationTree" type="AnimationTree" parent="."]
@@ -589,7 +589,7 @@ wait_time = 3.5
[node name="HitAnimation" type="AnimationPlayer" parent="."] [node name="HitAnimation" type="AnimationPlayer" parent="."]
unique_name_in_owner = true unique_name_in_owner = true
libraries = { libraries = {
&"": SubResource("AnimationLibrary_q1mdo") "": SubResource("AnimationLibrary_q1mdo")
} }
[node name="Hitbox" type="Area3D" parent="."] [node name="Hitbox" type="Area3D" parent="."]

View File

@@ -1,41 +1,22 @@
[gd_scene load_steps=11 format=3 uid="uid://by67pn7fdsg1m"] [gd_scene load_steps=9 format=3 uid="uid://by67pn7fdsg1m"]
[ext_resource type="Script" path="res://src/map/Map.cs" id="1_bw70o"] [ext_resource type="Script" path="res://src/map/Map.cs" id="1_bw70o"]
[ext_resource type="PackedScene" uid="uid://dvnc26rebk6o0" path="res://src/map/overworld/Overworld.tscn" id="1_ope1x"] [ext_resource type="PackedScene" uid="uid://dl6h1djc27ddl" path="res://src/map/overworld/Floor0.tscn" id="2_0m8h8"]
[ext_resource type="PackedScene" uid="uid://bc1sp6xwe0j65" path="res://src/map/dungeon/floors/Floor01.tscn" id="2_merfv"] [ext_resource type="PackedScene" uid="uid://bc1sp6xwe0j65" path="res://src/map/dungeon/floors/Floor01.tscn" id="2_merfv"]
[ext_resource type="Script" path="res://src/map/dungeon/code/Floor0.cs" id="3_n0f1p"]
[ext_resource type="PackedScene" uid="uid://g28xmp6cn16h" path="res://src/map/dungeon/floors/Floor11.tscn" id="3_niasb"] [ext_resource type="PackedScene" uid="uid://g28xmp6cn16h" path="res://src/map/dungeon/floors/Floor11.tscn" id="3_niasb"]
[ext_resource type="PackedScene" uid="uid://dmiqwmivkjgmq" path="res://src/map/dungeon/floors/Floor02.tscn" id="4_8y0oy"] [ext_resource type="PackedScene" uid="uid://dmiqwmivkjgmq" path="res://src/map/dungeon/floors/Floor02.tscn" id="4_8y0oy"]
[ext_resource type="PackedScene" uid="uid://bjqgl5u05ia04" path="res://src/map/dungeon/Teleport.tscn" id="5_jiohg"] [ext_resource type="PackedScene" uid="uid://bjqgl5u05ia04" path="res://src/map/dungeon/Teleport.tscn" id="5_jiohg"]
[ext_resource type="PackedScene" uid="uid://dl1scvkp8r5sw" path="res://src/map/dungeon/floors/Floor03.tscn" id="5_uag72"] [ext_resource type="PackedScene" uid="uid://dl1scvkp8r5sw" path="res://src/map/dungeon/floors/Floor03.tscn" id="5_uag72"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_phn4t"]
sky_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
sky_energy_multiplier = 0.3
ground_horizon_color = Color(0.64625, 0.65575, 0.67075, 1)
[sub_resource type="Sky" id="Sky_v6mio"]
sky_material = SubResource("ProceduralSkyMaterial_phn4t")
[sub_resource type="Environment" id="Environment_hjjsv"]
background_energy_multiplier = 0.0
sky = SubResource("Sky_v6mio")
ambient_light_source = 1
reflected_light_source = 1
fog_mode = 1
fog_density = 1.0
volumetric_fog_enabled = true
volumetric_fog_density = 0.0315
volumetric_fog_length = 9.49
adjustment_enabled = true
[node name="Map" type="Node3D"] [node name="Map" type="Node3D"]
script = ExtResource("1_bw70o") script = ExtResource("1_bw70o")
[node name="WorldEnvironment" type="WorldEnvironment" parent="."] [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_hjjsv")
[node name="Overworld" parent="." instance=ExtResource("1_ope1x")] [node name="Floor0" parent="." instance=ExtResource("2_0m8h8")]
unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.77792, 1.78656, -5.13176)
script = ExtResource("3_n0f1p")
[node name="Floor11" parent="." instance=ExtResource("3_niasb")] [node name="Floor11" parent="." instance=ExtResource("3_niasb")]

View File

@@ -30,10 +30,20 @@ namespace GameJamDungeon
[Node] public Area3D ActivateTrap { get; set; } = default!; [Node] public Area3D ActivateTrap { get; set; } = default!;
[Node] public StaticBody3D GateCollision { get; set; } = default!;
public void Setup() public void Setup()
{ {
SpawnItems(); SpawnItems();
ActivateTrap.BodyEntered += StartBossFight; ActivateTrap.BodyEntered += StartBossFight;
OxFace.CurrentHP.Sync += BossHPUpdate;
HorseFace.CurrentHP.Sync += BossHPUpdate;
}
private void BossHPUpdate(double obj)
{
if (OxFace.CurrentHP.Value <= 0 && HorseFace.CurrentHP.Value <= 0)
GateCollision.Hide();
} }
private void SpawnItems() private void SpawnItems()
@@ -55,5 +65,10 @@ namespace GameJamDungeon
OxFace.Activate(); OxFace.Activate();
HorseFace.Activate(); HorseFace.Activate();
} }
private void EndBossFight()
{
GateCollision.Hide();
}
} }
} }

View File

@@ -0,0 +1,27 @@
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Godot;
[Meta(typeof(IAutoNode))]
public partial class Floor0 : Node3D, IDungeonFloor
{
public override void _Notification(int what) => this.Notify(what);
[Node] public Marker3D PlayerSpawnPoint { get; set; } = default!;
[Node] public Marker3D ExitSpawnPoint { get; set; } = default!;
public Transform3D GetPlayerSpawnPoint()
{
return PlayerSpawnPoint.GlobalTransform;
}
public Vector3 GetTeleportSpawnPoint()
{
return ExitSpawnPoint.GlobalPosition;
}
public void InitializeDungeon()
{
}
}

View File

@@ -17,6 +17,7 @@ public partial class Overworld : Node3D, IDungeonFloor
public void InitializeDungeon() public void InitializeDungeon()
{ {
Show();
} }
public Transform3D GetPlayerSpawnPoint() public Transform3D GetPlayerSpawnPoint()

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,34 @@
[gd_scene load_steps=3 format=3 uid="uid://dl6h1djc27ddl"]
[ext_resource type="Script" path="res://src/map/dungeon/code/Overworld.cs" id="1_2ce63"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pb22g"]
[node name="Floor0" type="Node3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63488, -5.13176)
script = ExtResource("1_2ce63")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0)
light_energy = 0.597
light_indirect_energy = 1.647
light_volumetric_fog_energy = 0.2
shadow_enabled = true
shadow_opacity = 0.75
shadow_blur = 4.224
directional_shadow_fade_start = 0.63
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
[node name="PlayerSpawnPoint" type="Marker3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(-0.0104718, 0, 0.999945, 0, 1, 0, -0.999945, 0, -0.0104718, 3.6247, 1.51594, 2.81014)
[node name="ExitSpawnPoint" type="Marker3D" parent="."]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.05854, -1.04714, 1.38579)
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.84864, 0)
size = Vector3(10, 1, 10)
material = SubResource("StandardMaterial3D_pb22g")

View File

@@ -1,20 +1,9 @@
[gd_scene load_steps=7 format=3 uid="uid://dvnc26rebk6o0"] [gd_scene load_steps=4 format=3 uid="uid://dvnc26rebk6o0"]
[ext_resource type="Script" path="res://src/map/dungeon/code/Overworld.cs" id="1_5hmt3"] [ext_resource type="Script" path="res://src/map/dungeon/code/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://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://d4l4qutp8x40c" path="res://src/npc/rat/NPC.tscn" id="3_4sm8u"]
[sub_resource type="NavigationMesh" id="NavigationMesh_xplxw"]
vertices = PackedVector3Array(-26.8631, 1.06755, -24.5, -26.8631, 1.06755, 24.5, 22.1369, 1.06755, 24.5, 22.1369, 1.06755, -24.5)
polygons = [PackedInt32Array(3, 2, 0), PackedInt32Array(0, 2, 1)]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dm52s"]
albedo_color = Color(1, 1, 1, 0)
[sub_resource type="PlaneMesh" id="PlaneMesh_6o1o7"]
material = SubResource("StandardMaterial3D_dm52s")
size = Vector2(50, 50)
[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_5hmt3") script = ExtResource("1_5hmt3")
@@ -41,13 +30,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25.3664, 0.9708, 17.5532)
[node name="OverworldMap" parent="." instance=ExtResource("2_qwsky")] [node name="OverworldMap" parent="." instance=ExtResource("2_qwsky")]
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
navigation_mesh = SubResource("NavigationMesh_xplxw")
[node name="MeshInstance3D" type="MeshInstance3D" parent="NavigationRegion3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.3631, 0.56755, 0)
visible = false
mesh = SubResource("PlaneMesh_6o1o7")
[node name="NPC" parent="." instance=ExtResource("3_4sm8u")] [node name="NPC" parent="." instance=ExtResource("3_4sm8u")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25.0589, 2.01954, -0.291408) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -25.0589, 2.01954, -0.291408)

View File

@@ -0,0 +1,34 @@
shader_type spatial;
render_mode unshaded;
uniform sampler2D sky_texture : source_color;
uniform bool lock_aspect = false;
uniform float aspect_ratio = 1.3333333;
uniform vec2 fov = vec2(180.0, 90.0);
uniform ivec2 tiling = ivec2(1, 1);
uniform vec2 offset = vec2(0.0, 0.0);
varying vec4 BG_COORDS;
void vertex() {
//Camera YX rotation per Basis.get_euler source code
float y = atan(VIEW_MATRIX[0][2], VIEW_MATRIX[2][2]);
float x = asin(VIEW_MATRIX[1][2]);
//Map rotation to screen space
BG_COORDS.xy = vec2(y * -0.5, x) / PI;
BG_COORDS.y += 0.5;
BG_COORDS.w = fov.y / 180.0;
BG_COORDS.z = !lock_aspect ? fov.x / 360.0 : VIEWPORT_SIZE.x / (VIEWPORT_SIZE.y * aspect_ratio) * BG_COORDS.w;
//Keep background centered vertically when FOV changes
BG_COORDS.y *= BG_COORDS.w > 1.0 ? 0.0 : 1.0 - BG_COORDS.w;
}
void fragment() {
vec2 uv_offset = vec2(-offset.x, offset.y);
vec2 uv = (SCREEN_UV + uv_offset) * BG_COORDS.zw + BG_COORDS.xy;
uv *= vec2(tiling);
ALBEDO = texture(sky_texture, uv).rgb;
}