Compare commits
3 Commits
5404f8e7b0
...
22a930358c
| Author | SHA1 | Date | |
|---|---|---|---|
| 22a930358c | |||
| 45f1f5df01 | |||
| 669a489f64 |
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bn6lta2vs6qh8"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_m0wvh"]
|
||||
[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_m0wvh"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_8tlf5"]
|
||||
albedo_color = Color(0, 0, 0, 1)
|
||||
|
||||
@@ -210,6 +210,11 @@ locale/translations_pot_files=PackedStringArray("res://src/dialog/Dialogue.dialo
|
||||
3d_physics/layer_10="Minimap"
|
||||
3d_physics/layer_11="ItemRescue"
|
||||
3d_physics/layer_12="EnemyHitbox"
|
||||
3d_physics/layer_32="Navigation"
|
||||
|
||||
[navigation]
|
||||
|
||||
3d/default_cell_height=1.0
|
||||
|
||||
[physics]
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ public partial class BossLogic
|
||||
var boss = Get<IBoss>();
|
||||
var player = Get<IPlayer>();
|
||||
var delta = (float)input.Delta;
|
||||
var playerPosition = new Vector3(player.CurrentPosition.X, boss.GlobalPosition.Y, player.CurrentPosition.Z);
|
||||
var targetDirection = boss.GlobalPosition - player.CurrentPosition;
|
||||
boss.GlobalRotation = new Vector3(boss.GlobalRotation.X, Mathf.LerpAngle(boss.GlobalRotation.Y, Mathf.Atan2(-targetDirection.X, -targetDirection.Z), delta * 3f), boss.GlobalRotation.Z);
|
||||
if (boss.GlobalPosition.DistanceTo(player.CurrentPosition) > 5.0f)
|
||||
|
||||
@@ -11,11 +11,10 @@ public partial class BossLogic
|
||||
{
|
||||
public Transition On(in Input.PhysicsTick input)
|
||||
{
|
||||
var delta = input.Delta;
|
||||
var enemy = Get<IEnemy>();
|
||||
var player = Get<IPlayer>();
|
||||
var target = player.CurrentPosition;
|
||||
enemy.MoveToLocation(target, (float)delta);
|
||||
enemy.SetTarget(target);
|
||||
return ToSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@ using Chickensoft.AutoInject;
|
||||
using Chickensoft.Collections;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
@@ -22,7 +25,7 @@ public partial class Enemy : RigidBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
|
||||
[Dependency] IGameEventDepot GameEventDepot => this.DependOn<IGameEventDepot>();
|
||||
|
||||
[Dependency] protected IPlayer Player => this.DependOn<IPlayer>();
|
||||
[Dependency] protected IPlayer Player => this.DependOn<IPlayer>(() => GetParent().GetChildren().OfType<IPlayer>().Single());
|
||||
#endregion
|
||||
|
||||
#region Exports
|
||||
@@ -53,12 +56,51 @@ public partial class Enemy : RigidBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
|
||||
private Vector3 _knockbackDirection = Vector3.Zero;
|
||||
|
||||
private Vector3 _currentTarget = Vector3.Zero;
|
||||
|
||||
private Timer _thinkTimer;
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
_enemyLogic = new EnemyLogic();
|
||||
_enemyLogic.Set(_enemyStatResource);
|
||||
_enemyLogic.Set(this as IEnemy);
|
||||
_enemyLogic.Set(Player);
|
||||
|
||||
NavAgent.VelocityComputed += NavAgent_VelocityComputed;
|
||||
NavAgent.TargetReached += NavAgent_TargetReached;
|
||||
|
||||
_thinkTimer = new Timer
|
||||
{
|
||||
WaitTime = 1f
|
||||
};
|
||||
AddChild(_thinkTimer);
|
||||
_thinkTimer.Timeout += NavAgent_TargetReached;
|
||||
_thinkTimer.Start();
|
||||
}
|
||||
|
||||
private void NavAgent_TargetReached()
|
||||
{
|
||||
NavAgent.TargetPosition = _currentTarget;
|
||||
}
|
||||
|
||||
private void NavAgent_VelocityComputed(Vector3 safeVelocity)
|
||||
{
|
||||
if (CurrentHP <= 0)
|
||||
return;
|
||||
|
||||
var lookDir = GlobalPosition - safeVelocity;
|
||||
var leveledLookDir = new Vector3(lookDir.X, Position.Y, lookDir.Z);
|
||||
if (leveledLookDir.DistanceTo(GlobalPosition) > 0.2f)
|
||||
LookAt(new Vector3(lookDir.X, Position.Y, lookDir.Z), Vector3.Up);
|
||||
|
||||
_knockbackStrength = _knockbackStrength * 0.9f;
|
||||
MoveAndCollide(safeVelocity + (_knockbackDirection * _knockbackStrength));
|
||||
}
|
||||
|
||||
public void SetTarget(Vector3 target)
|
||||
{
|
||||
Task.Delay(TimeSpan.FromSeconds(1.5)).ContinueWith(_ => _currentTarget = new Vector3(target.X, -1.75f, target.Z));
|
||||
}
|
||||
|
||||
public void TakeDamage(double damage, ElementType elementType, bool isCriticalHit = false, bool ignoreDefense = false, bool ignoreElementalResistance = false)
|
||||
@@ -80,26 +122,29 @@ public partial class Enemy : RigidBody3D, IEnemy, IProvide<IEnemyLogic>
|
||||
|
||||
EnemyModelView.PlayHitAnimation();
|
||||
_enemyLogic.Input(new EnemyLogic.Input.Alerted());
|
||||
|
||||
if (Player.EquippedWeapon.Value.WeaponTags.Contains(WeaponTag.SelfDamage))
|
||||
Player.Stats.SetCurrentHP(Player.Stats.CurrentHP.Value - 5);
|
||||
}
|
||||
}
|
||||
|
||||
public void MoveToLocation(Vector3 target, float delta)
|
||||
public override void _PhysicsProcess(double delta)
|
||||
{
|
||||
NavAgent.TargetPosition = target;
|
||||
var targetPosition = NavAgent.GetNextPathPosition();
|
||||
if (CurrentHP <= 0)
|
||||
return;
|
||||
|
||||
var velocity = (targetPosition - GlobalTransform.Origin).Normalized() * 2f * delta;
|
||||
var lookAtDir = GlobalTransform.Origin - velocity;
|
||||
var lookAtPosition = new Vector3(lookAtDir.X, GlobalPosition.Y, lookAtDir.Z);
|
||||
var nextPathPosition = NavAgent.GetNextPathPosition();
|
||||
var movementDelta = 2f * (float)delta;
|
||||
|
||||
if (GlobalPosition.DistanceTo(target) > 1.0f && !velocity.IsEqualApprox(Vector3.Zero) && !Position.IsEqualApprox(lookAtPosition))
|
||||
LookAt(lookAtPosition + new Vector3(0.001f, 0.001f, 0.001f), Vector3.Up);
|
||||
var newVelocity = GlobalPosition.DirectionTo(nextPathPosition) * movementDelta;
|
||||
|
||||
if (NavAgent.AvoidanceEnabled)
|
||||
NavAgent.Velocity = newVelocity;
|
||||
else
|
||||
NavAgent_VelocityComputed(newVelocity);
|
||||
|
||||
var isWalking = _enemyLogic.Value is EnemyLogic.State.Patrolling or EnemyLogic.State.FollowPlayer;
|
||||
|
||||
EnemyModelView.RotateModel(GlobalTransform.Basis, -Player.CurrentBasis.Z, isWalking);
|
||||
_knockbackStrength = _knockbackStrength * 0.9f;
|
||||
MoveAndCollide(velocity + (_knockbackDirection * _knockbackStrength));
|
||||
}
|
||||
|
||||
public void Knockback(float impulse, Vector3 direction)
|
||||
|
||||
@@ -10,11 +10,11 @@ public interface IEnemy : IKillable
|
||||
|
||||
public void Knockback(float impulse, Vector3 direction);
|
||||
|
||||
public void MoveToLocation(Vector3 target, float delta);
|
||||
|
||||
public double CurrentHP { get; }
|
||||
|
||||
public void StartAttackTimer();
|
||||
|
||||
public void StopAttackTimer();
|
||||
|
||||
public void SetTarget(Vector3 target);
|
||||
}
|
||||
|
||||
8
src/enemy/IKnockbackable.cs
Normal file
8
src/enemy/IKnockbackable.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Godot;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
public interface IKnockbackable
|
||||
{
|
||||
public void Knockback(float impulse, Vector3 direction);
|
||||
}
|
||||
1
src/enemy/IKnockbackable.cs.uid
Normal file
1
src/enemy/IKnockbackable.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d7v2jmgpl6u8
|
||||
@@ -23,7 +23,7 @@ DropsSoulGemChance = 0.75
|
||||
metadata/_custom_type_script = ExtResource("2_oln85")
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"]
|
||||
radius = 0.62699
|
||||
radius = 0.3
|
||||
height = 2.02807
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_jbgmx"]
|
||||
@@ -40,6 +40,7 @@ collision_layer = 10
|
||||
collision_mask = 11
|
||||
axis_lock_linear_y = true
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_z = true
|
||||
contact_monitor = true
|
||||
max_contacts_reported = 1
|
||||
script = ExtResource("1_xsluo")
|
||||
@@ -52,11 +53,14 @@ shape = SubResource("CapsuleShape3D_cwfph")
|
||||
|
||||
[node name="NavAgent" type="NavigationAgent3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
path_max_distance = 3.01
|
||||
simplify_path = true
|
||||
avoidance_enabled = true
|
||||
radius = 2.0
|
||||
debug_path_custom_color = Color(1, 0, 0, 1)
|
||||
radius = 1.5
|
||||
neighbor_distance = 5.0
|
||||
time_horizon_obstacles = 1.0
|
||||
debug_enabled = true
|
||||
debug_use_custom = true
|
||||
debug_path_custom_color = Color(0.388717, 0.273656, 0.30701, 1)
|
||||
debug_path_custom_point_size = 10.0
|
||||
|
||||
[node name="LineOfSight" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -27,7 +27,7 @@ height = 5.0
|
||||
radius = 1.0
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_0h5s2"]
|
||||
radius = 0.404629
|
||||
radius = 0.3
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_wrps7"]
|
||||
radius = 1.0
|
||||
@@ -75,7 +75,10 @@ shape = SubResource("CapsuleShape3D_0h5s2")
|
||||
|
||||
[node name="NavAgent" type="NavigationAgent3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
path_postprocessing = 2
|
||||
avoidance_enabled = true
|
||||
radius = 5.0
|
||||
debug_enabled = true
|
||||
debug_path_custom_color = Color(1, 0, 0, 1)
|
||||
|
||||
[node name="EnemyModelView" parent="." instance=ExtResource("3_wrps7")]
|
||||
|
||||
@@ -11,11 +11,10 @@ public partial class EnemyLogic
|
||||
{
|
||||
public Transition On(in Input.PhysicsTick input)
|
||||
{
|
||||
var delta = input.Delta;
|
||||
var enemy = Get<IEnemy>();
|
||||
var player = Get<IPlayer>();
|
||||
var target = player.CurrentPosition;
|
||||
enemy.MoveToLocation(target, (float)delta);
|
||||
enemy.SetTarget(target);
|
||||
return ToSelf();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using Org.BouncyCastle.Asn1.X509;
|
||||
|
||||
namespace GameJamDungeon;
|
||||
|
||||
@@ -16,7 +17,7 @@ public partial class EnemyLogic
|
||||
{
|
||||
var delta = input.Delta;
|
||||
var enemy = Get<IEnemy>();
|
||||
enemy.MoveToLocation(_patrolTarget, (float)delta);
|
||||
enemy.SetTarget(_patrolTarget);
|
||||
return ToSelf();
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,6 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
PauseMenu.TransitionCompleted += OnPauseMenuTransitioned;
|
||||
PauseMenu.UnpauseButtonPressed += PauseMenu_UnpauseButtonPressed;
|
||||
Map.DungeonFinishedGenerating += Map_DungeonFinishedGenerating;
|
||||
InGameUI.InventoryMenu.ClosedMenu += InventoryMenu_CloseInventory;
|
||||
InGameUI.MinimapButtonReleased += Player_MinimapButtonReleased;
|
||||
|
||||
@@ -274,7 +273,7 @@ public partial class Game : Node3D, IGame
|
||||
|
||||
private void InventoryMenu_CloseInventory() => GameLogic.Input(new GameLogic.Input.CloseInventory());
|
||||
|
||||
private void Map_DungeonFinishedGenerating()
|
||||
public void NextFloorLoaded()
|
||||
{
|
||||
var transform = Map.GetPlayerSpawnPosition();
|
||||
GameRepo.SetPlayerGlobalTransform(transform);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://33ek675mfb5n"]
|
||||
[gd_scene load_steps=14 format=3 uid="uid://33ek675mfb5n"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://chftlu4proh3d" path="res://src/game/Game.cs" id="1_ytcii"]
|
||||
[ext_resource type="Shader" uid="uid://dmjxo4k2rx1an" path="res://src/app/App.gdshader" id="2_6ifxs"]
|
||||
[ext_resource type="PackedScene" uid="uid://by67pn7fdsg1m" path="res://src/map/Map.tscn" id="3_d8awv"]
|
||||
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="3_kk6ly"]
|
||||
[ext_resource type="Resource" uid="uid://bpdbuf0k0exb5" path="res://src/items/weapons/resources/Sword Sword Odette.tres" id="4_6pp6l"]
|
||||
[ext_resource type="PackedScene" uid="uid://b1muxus5qdbeu" path="res://src/ui/in_game_ui/InGameUI.tscn" id="5_lxtnp"]
|
||||
[ext_resource type="PackedScene" uid="uid://b16ejcwanod72" path="res://src/audio/InGameAudio.tscn" id="6_qc71l"]
|
||||
[ext_resource type="Script" uid="uid://daphxl6vvsbjm" path="res://src/game/DialogueController.cs" id="10_58pbt"]
|
||||
@@ -48,7 +49,8 @@ process_mode = 1
|
||||
[node name="Player" parent="SubViewportContainer/SubViewport/PauseContainer" instance=ExtResource("3_kk6ly")]
|
||||
unique_name_in_owner = true
|
||||
process_mode = 1
|
||||
transform = Transform3D(0.0141716, 0, 0.9999, 0, 1, 0, -0.9999, 0, 0.0141716, 0, -1.02535, -6.18796)
|
||||
transform = Transform3D(0.0141716, 0, 0.9999, 0, 1, 0, -0.9999, 0, 0.0141716, 0, -2.25339, -6.18796)
|
||||
_defaultWeapon = ExtResource("4_6pp6l")
|
||||
|
||||
[node name="Map" parent="SubViewportContainer/SubViewport/PauseContainer" instance=ExtResource("3_d8awv")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
@@ -26,4 +26,6 @@ public interface IGame : IProvide<IGameRepo>, IProvide<IGameEventDepot>, IProvid
|
||||
public void AnnounceMessageOnMainScreen(string message);
|
||||
|
||||
public void FloorExitReached();
|
||||
|
||||
public void NextFloorLoaded();
|
||||
}
|
||||
|
||||
@@ -9,9 +9,7 @@ namespace GameJamDungeon;
|
||||
|
||||
public interface IMap : INode3D
|
||||
{
|
||||
event Map.DungeonFinishedGeneratingEventHandler DungeonFinishedGenerating;
|
||||
|
||||
public List<IDungeonFloor> Floors { get; }
|
||||
public Godot.Collections.Array<PackedScene> Floors { get; }
|
||||
|
||||
public void SpawnNextFloor();
|
||||
|
||||
@@ -24,33 +22,37 @@ public partial class Map : Node3D, IMap
|
||||
{
|
||||
public override void _Notification(int what) => this.Notify(what);
|
||||
|
||||
[Signal]
|
||||
public delegate void DungeonFinishedGeneratingEventHandler();
|
||||
|
||||
[Dependency]
|
||||
public IGameEventDepot GameEventDepot => this.DependOn<IGameEventDepot>();
|
||||
public IGame Game => this.DependOn<IGame>();
|
||||
|
||||
public List<IDungeonFloor> Floors { get; set; } = default!;
|
||||
|
||||
[Node] public Floor0 Floor0 { get; set; } = default!;
|
||||
[Export]
|
||||
public Godot.Collections.Array<PackedScene> Floors { get; set; } = default!;
|
||||
|
||||
private IDungeonFloor _currentFloor;
|
||||
|
||||
public void Setup()
|
||||
{
|
||||
Floors = GetChildren().OfType<IDungeonFloor>().ToList();
|
||||
_currentFloor = Floors.ElementAt(0);
|
||||
LoadFloor();
|
||||
}
|
||||
|
||||
public void SpawnNextFloor()
|
||||
{
|
||||
var oldFloor = _currentFloor;
|
||||
Floors.Remove(oldFloor);
|
||||
oldFloor.CallDeferred(MethodName.QueueFree, []);
|
||||
_currentFloor = Floors.ElementAt(0);
|
||||
LoadFloor();
|
||||
_currentFloor.InitializeDungeon();
|
||||
EmitSignal(SignalName.DungeonFinishedGenerating);
|
||||
Game.NextFloorLoaded();
|
||||
}
|
||||
|
||||
public Transform3D GetPlayerSpawnPosition() => _currentFloor.GetPlayerSpawnPoint();
|
||||
|
||||
private void LoadFloor()
|
||||
{
|
||||
var currentFloorScene = Floors.First();
|
||||
var instantiator = new Instantiator(GetTree());
|
||||
var loadedScene = instantiator.LoadAndInstantiate<Node3D>(currentFloorScene.ResourcePath);
|
||||
AddChild(loadedScene);
|
||||
_currentFloor = (IDungeonFloor)loadedScene;
|
||||
Floors.Remove(currentFloorScene);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,75 +1,13 @@
|
||||
[gd_scene load_steps=22 format=3 uid="uid://by67pn7fdsg1m"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://by67pn7fdsg1m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://14e8mu48ed4" path="res://src/map/Map.cs" id="1_bw70o"]
|
||||
[ext_resource type="PackedScene" uid="uid://dl6h1djc27ddl" path="res://src/map/dungeon/floors/Floor00.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://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://dl1scvkp8r5sw" path="res://src/map/dungeon/floors/Floor03.tscn" id="5_uag72"]
|
||||
[ext_resource type="PackedScene" uid="uid://cikq7vuorlpbl" path="res://src/map/dungeon/floors/Floor04.tscn" id="6_httk4"]
|
||||
[ext_resource type="PackedScene" uid="uid://t7cac7801bnk" path="res://src/map/dungeon/floors/Floor05.tscn" id="7_ro62w"]
|
||||
[ext_resource type="PackedScene" uid="uid://da107mywg18x1" path="res://src/map/dungeon/floors/Floor06.tscn" id="8_q7oan"]
|
||||
[ext_resource type="PackedScene" uid="uid://cgtqjgh1f5fqi" path="res://src/map/dungeon/floors/Floor07.tscn" id="9_3vg2e"]
|
||||
[ext_resource type="PackedScene" uid="uid://dg20ovvj2m2lp" path="res://src/map/dungeon/floors/Floor08.tscn" id="10_tx34j"]
|
||||
[ext_resource type="PackedScene" uid="uid://b5jk743ng6fqg" path="res://src/map/dungeon/floors/Floor09.tscn" id="11_8npfy"]
|
||||
[ext_resource type="PackedScene" uid="uid://dl2x3l7a3an65" path="res://src/map/dungeon/floors/Floor11.tscn" id="12_pids3"]
|
||||
[ext_resource type="PackedScene" uid="uid://drvjw06wbi2qh" path="res://src/map/dungeon/floors/Floor12.tscn" id="13_u3fsa"]
|
||||
[ext_resource type="PackedScene" uid="uid://fellg2owwe64" path="res://src/map/dungeon/floors/Floor13.tscn" id="14_io2ww"]
|
||||
[ext_resource type="PackedScene" uid="uid://vhqwff12y7wn" path="res://src/map/dungeon/floors/Floor14.tscn" id="15_rb6u5"]
|
||||
[ext_resource type="PackedScene" uid="uid://h8tc1uohuqx2" path="res://src/map/dungeon/floors/Floor15.tscn" id="16_31a0u"]
|
||||
[ext_resource type="PackedScene" uid="uid://cyfp0p38w2yfr" path="res://src/map/dungeon/floors/Floor16.tscn" id="17_sbsee"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnrbqkv438tjx" path="res://src/map/dungeon/floors/Floor17.tscn" id="18_qamtw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cgoogenmugoti" path="res://src/map/dungeon/floors/Floor18.tscn" id="19_j54h1"]
|
||||
[ext_resource type="PackedScene" uid="uid://33lvido1dkbu" path="res://src/map/dungeon/floors/Floor19.tscn" id="20_41t83"]
|
||||
|
||||
[node name="Map" type="Node3D"]
|
||||
script = ExtResource("1_bw70o")
|
||||
Floors = Array[PackedScene]([ExtResource("2_0m8h8"), ExtResource("2_merfv"), ExtResource("4_8y0oy"), ExtResource("5_uag72")])
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
|
||||
[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)
|
||||
|
||||
[node name="Floor1" parent="." instance=ExtResource("2_merfv")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="Floor2" parent="." instance=ExtResource("4_8y0oy")]
|
||||
|
||||
[node name="Floor3" parent="." instance=ExtResource("5_uag72")]
|
||||
|
||||
[node name="Floor04" parent="." instance=ExtResource("6_httk4")]
|
||||
|
||||
[node name="Floor05" parent="." instance=ExtResource("7_ro62w")]
|
||||
|
||||
[node name="Floor06" parent="." instance=ExtResource("8_q7oan")]
|
||||
|
||||
[node name="Floor07" parent="." instance=ExtResource("9_3vg2e")]
|
||||
|
||||
[node name="Floor08" parent="." instance=ExtResource("10_tx34j")]
|
||||
|
||||
[node name="Floor09" parent="." instance=ExtResource("11_8npfy")]
|
||||
|
||||
[node name="Floor11" parent="." instance=ExtResource("12_pids3")]
|
||||
|
||||
[node name="Floor12" parent="." instance=ExtResource("13_u3fsa")]
|
||||
|
||||
[node name="Floor13" parent="." instance=ExtResource("14_io2ww")]
|
||||
|
||||
[node name="Floor14" parent="." instance=ExtResource("15_rb6u5")]
|
||||
|
||||
[node name="Floor15" parent="." instance=ExtResource("16_31a0u")]
|
||||
|
||||
[node name="Floor16" parent="." instance=ExtResource("17_sbsee")]
|
||||
|
||||
[node name="Floor17" parent="." instance=ExtResource("18_qamtw")]
|
||||
|
||||
[node name="Floor18" parent="." instance=ExtResource("19_j54h1")]
|
||||
|
||||
[node name="Floor19" parent="." instance=ExtResource("20_41t83")]
|
||||
|
||||
[node name="Teleport" parent="." instance=ExtResource("5_jiohg")]
|
||||
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
|
||||
|
||||
8
src/map/dungeon/NavigationMesh.tres
Normal file
8
src/map/dungeon/NavigationMesh.tres
Normal file
@@ -0,0 +1,8 @@
|
||||
[gd_resource type="NavigationMesh" format=3 uid="uid://d3n1gyxfjcm5u"]
|
||||
|
||||
[resource]
|
||||
vertices = PackedVector3Array(-39, -1.46346, -18.25, -29.25, -1.46346, -18, -29, -1.46346, -20.25, -28.25, -1.46346, -21, -26.25, -1.46346, -39, -39, -1.46346, -39, -26.25, -1.46346, -21, -13.5, -1.46346, -21, -13.5, -1.46346, -39, -11.5, -1.46346, -21, -10.75, -1.46346, -20.25, 39, -1.46346, -39, -10.75, -1.46346, -1, 39, -1.46346, -0.75, -25.25, -1.46346, -15.75, -26.5, -1.46346, -15, -26.5, -1.46346, -13, -21, -1.46346, -12, -18, -1.46346, -11.25, -18, -1.46346, -10, -13.25, -1.46346, -10, -13.25, -1.46346, -15, -14, -1.46346, -15, -14.75, -1.46346, -15.75, -18.75, -1.46346, -12, -14.5, -1.46346, -18.5, -25.25, -1.46346, -18.5, -39, -1.46346, -13.75, -29, -1.46346, -13.75, -29, -1.46346, -8.25, -28, -1.46346, -9, -28, -1.46346, -11, -29, -1.46346, -11.75, -39, -1.46346, -6.25, -29, -1.46346, -6.25, -27, -1.46346, -8.5, -26.75, -1.46346, -11.75, -26.5, -1.46346, -6.75, -21, -1.46346, -8, -22, -1.46346, -8.75, -22, -1.46346, -11.25, -26.5, -1.46346, -4.75, -25.25, -1.46346, -4, -18, -1.46346, -8.75, -14, -1.46346, -4.75, -13.25, -1.46346, -4.75, -18.75, -1.46346, -8, -14.75, -1.46346, -4, -25.5, -1.46346, -1.25, -14.5, -1.46346, -1.25, -29.25, -1.46346, -1.75, -39, -1.46346, -1.5, -29, -1.46346, 0.5, -28.25, -1.46346, 1.25, -39, -1.46346, 39, -12.75, -1.46346, 39, -13, -1.46346, 1.25, -11.5, -1.46346, 1.25, -10.75, -1.46346, 0.5, 39, -1.46346, 39)
|
||||
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(2, 0, 3), PackedInt32Array(3, 0, 5), PackedInt32Array(3, 5, 4), PackedInt32Array(4, 6, 3), PackedInt32Array(4, 8, 6), PackedInt32Array(6, 8, 7), PackedInt32Array(9, 7, 8), PackedInt32Array(9, 8, 10), PackedInt32Array(10, 8, 11), PackedInt32Array(12, 10, 13), PackedInt32Array(13, 10, 11), PackedInt32Array(15, 14, 16), PackedInt32Array(16, 14, 17), PackedInt32Array(20, 19, 18), PackedInt32Array(22, 21, 20), PackedInt32Array(18, 24, 20), PackedInt32Array(20, 24, 22), PackedInt32Array(22, 24, 23), PackedInt32Array(24, 17, 23), PackedInt32Array(23, 17, 25), PackedInt32Array(25, 17, 14), PackedInt32Array(25, 14, 26), PackedInt32Array(0, 1, 27), PackedInt32Array(27, 1, 28), PackedInt32Array(30, 29, 31), PackedInt32Array(31, 29, 32), PackedInt32Array(32, 29, 33), PackedInt32Array(32, 33, 27), PackedInt32Array(27, 28, 32), PackedInt32Array(29, 34, 33), PackedInt32Array(30, 31, 35), PackedInt32Array(35, 31, 36), PackedInt32Array(39, 38, 37), PackedInt32Array(36, 16, 35), PackedInt32Array(35, 16, 37), PackedInt32Array(37, 16, 39), PackedInt32Array(39, 16, 40), PackedInt32Array(16, 17, 40), PackedInt32Array(41, 37, 42), PackedInt32Array(42, 37, 38), PackedInt32Array(43, 19, 20), PackedInt32Array(20, 45, 44), PackedInt32Array(43, 20, 46), PackedInt32Array(46, 20, 44), PackedInt32Array(46, 44, 47), PackedInt32Array(46, 47, 38), PackedInt32Array(38, 47, 49), PackedInt32Array(38, 49, 42), PackedInt32Array(42, 49, 48), PackedInt32Array(51, 33, 50), PackedInt32Array(50, 33, 34), PackedInt32Array(52, 51, 50), PackedInt32Array(52, 53, 51), PackedInt32Array(51, 53, 54), PackedInt32Array(56, 55, 53), PackedInt32Array(53, 55, 54), PackedInt32Array(55, 56, 57), PackedInt32Array(57, 58, 55), PackedInt32Array(55, 58, 59), PackedInt32Array(59, 58, 13), PackedInt32Array(58, 12, 13)]
|
||||
geometry_parsed_geometry_type = 1
|
||||
geometry_collision_mask = 2147483648
|
||||
agent_radius = 1.0
|
||||
@@ -19,6 +19,4 @@ public partial class BossFloor : Node3D, IDungeonFloor
|
||||
}
|
||||
|
||||
public Transform3D GetPlayerSpawnPoint() => BossRoom.PlayerSpawn.GlobalTransform;
|
||||
|
||||
public Vector3 GetTeleportSpawnPoint() => BossRoom.TeleportSpawn.GlobalPosition;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ public partial class BossRoomA : Node3D, IBossRoom
|
||||
|
||||
[Node] public Marker3D PlayerSpawn { get; set; } = default!;
|
||||
|
||||
[Node] public Marker3D TeleportSpawn { get; set; } = default!;
|
||||
|
||||
[Node] public Node3D HorseHeadStatue { get; set; } = default!;
|
||||
|
||||
[Node] public Node3D OxFaceStatue { get; set; } = default!;
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace GameJamDungeon
|
||||
|
||||
[Node] public GodotObject DungeonGenerator { get; set; } = default!;
|
||||
|
||||
[Node] public NavigationRegion3D NavigationRegion3D { get; set; } = default!;
|
||||
|
||||
[Node] public EnemyDatabase EnemyDatabase { get; set; } = default!;
|
||||
|
||||
private Transform3D _playerSpawnPoint;
|
||||
@@ -23,13 +21,12 @@ namespace GameJamDungeon
|
||||
|
||||
public void InitializeDungeon()
|
||||
{
|
||||
Rooms = new List<MonsterRoom>();
|
||||
DungeonGenerator.Call("generate");
|
||||
NavigationRegion3D.BakeNavigationMesh();
|
||||
Rooms = [];
|
||||
Rooms = FindAllDungeonRooms([.. GetChildren()], Rooms);
|
||||
_playerSpawnPoint = RandomizePlayerSpawnPoint();
|
||||
foreach (var room in Rooms)
|
||||
room.SpawnEnemies(EnemyDatabase);
|
||||
DungeonGenerator.EmitSignal("done_generating");
|
||||
}
|
||||
|
||||
public Transform3D GetPlayerSpawnPoint() => _playerSpawnPoint;
|
||||
@@ -52,9 +49,14 @@ namespace GameJamDungeon
|
||||
return roomsFound;
|
||||
|
||||
foreach (var node in nodesToSearch)
|
||||
{
|
||||
if (node is MonsterRoom dungeonRoom)
|
||||
roomsFound.Add(dungeonRoom);
|
||||
|
||||
if (node.HasSignal("dungeon_done_generating"))
|
||||
node.EmitSignal("dungeon_done_generating");
|
||||
}
|
||||
|
||||
return FindAllDungeonRooms(nodesToSearch.SelectMany(x => x.GetChildren()).ToList(), roomsFound);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=58 format=4 uid="uid://dpec2lbt83dhe"]
|
||||
[gd_scene load_steps=59 format=4 uid="uid://dpec2lbt83dhe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_ho6e8"]
|
||||
[ext_resource type="Script" uid="uid://dhollu4j3pynq" path="res://src/map/dungeon/code/MonsterRoom.cs" id="2_phhs1"]
|
||||
@@ -645,6 +645,9 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_i3ffh")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_phhs1"]
|
||||
size = Vector3(2.12268, 5.82227, 1.63702)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_51rrf"]
|
||||
shading_mode = 0
|
||||
albedo_texture = ExtResource("20_le1vp")
|
||||
@@ -679,6 +682,8 @@ script = ExtResource("2_phhs1")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="Antechamber A"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.10505, -1.44377, 0.0953512)
|
||||
collision_layer = 2147483649
|
||||
collision_mask = 2147483649
|
||||
|
||||
[node name="ROOM" type="MeshInstance3D" parent="Antechamber A/StaticBody3D"]
|
||||
transform = Transform3D(0.287429, 0, 0, 0, 0.287429, 0, 0, 0, 0.287429, 2.1526, 3.44987, -0.0743999)
|
||||
@@ -759,6 +764,19 @@ unique_name_in_owner = true
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.33663, -1.49877, 0.845012)
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="Antechamber A"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -87.0242)
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D7" type="CollisionShape3D" parent="Antechamber A/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.49594, -0.677457, 94.6461)
|
||||
shape = SubResource("BoxShape3D_phhs1")
|
||||
|
||||
[node name="CollisionShape3D8" type="CollisionShape3D" parent="Antechamber A/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.66204, -0.677457, 94.7863)
|
||||
shape = SubResource("BoxShape3D_phhs1")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0314088, 4.23029, -0.0385468)
|
||||
visible = false
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
[ext_resource type="Texture2D" uid="uid://c7a88c8312lax" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_COLUM2N.png" id="7_0a6f8"]
|
||||
[ext_resource type="Texture2D" uid="uid://1phqxw5fsvcr" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_FLOOR1.jpg" id="8_y7arm"]
|
||||
[ext_resource type="Texture2D" uid="uid://c31ob7pis55ex" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_tile2.png" id="9_85rlu"]
|
||||
[ext_resource type="Texture2D" uid="uid://b7tsum5uiwakt" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_mother.png" id="10_cug6o"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjiyibg7dwpk7" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_mother.png" id="10_cug6o"]
|
||||
[ext_resource type="Texture2D" uid="uid://cu6gxsk51w5t8" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_brick3.png" id="11_layqk"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca83ef2cf1i8c" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_STONE_PANEL_1png.png" id="12_7tgyc"]
|
||||
[ext_resource type="Texture2D" uid="uid://cl6gq1xxh7a1p" path="res://src/map/dungeon/models/Set A/06. Balcony Room A/INNER_BALCONY_ROOM_VER2_STONE_PANEL_1png.png" id="12_7tgyc"]
|
||||
[ext_resource type="Texture2D" uid="uid://del2dfj3etokd" path="res://src/map/dungeon/textures/BLOCKED-DOOR_REGULAR.png" id="13_66rjw"]
|
||||
[ext_resource type="Texture2D" uid="uid://bkvegamuqdsdd" path="res://src/map/dungeon/models/Set A/18. Corridor A/CORRIDOR test_FLOOR1.jpg" id="14_vh3wx"]
|
||||
[ext_resource type="PackedScene" uid="uid://twrj4wixcbu7" path="res://src/items/ItemDatabase.tscn" id="15_n8s21"]
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dc8x3dt0yw1sk" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_tile2.png" id="10_kov0t"]
|
||||
[ext_resource type="Texture2D" uid="uid://cmr1m0274t523" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_CEILING_1.jpg" id="11_15f7d"]
|
||||
[ext_resource type="Texture2D" uid="uid://bx6qpiilt603p" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_swirled_column.png" id="12_26e3e"]
|
||||
[ext_resource type="Texture2D" uid="uid://bftg4wbwo22ec" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_hand-tiile.png" id="13_c8egr"]
|
||||
[ext_resource type="Texture2D" uid="uid://drhdnxjtr5nfu" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_mother.png" id="14_a3t4a"]
|
||||
[ext_resource type="Texture2D" uid="uid://diycnai6xchra" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_hand-tiile.png" id="13_c8egr"]
|
||||
[ext_resource type="Texture2D" uid="uid://psegg6m0wkkv" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_mother.png" id="14_a3t4a"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5dvsdtjs5on7" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_brick3.png" id="15_bodf5"]
|
||||
[ext_resource type="Texture2D" uid="uid://qktxynvfn2dv" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_WALL TILE 1.jpg" id="16_rsggy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cht55vtpuowx5" path="res://src/map/dungeon/models/Set A/07. Statue Room/ANTECHAMBER_TYPE2_VER3_FLOOR1.jpg" id="17_ff6nl"]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=65 format=4 uid="uid://b82dx66mgs2d7"]
|
||||
[gd_scene load_steps=66 format=4 uid="uid://b82dx66mgs2d7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_0qew1"]
|
||||
[ext_resource type="Script" uid="uid://dhollu4j3pynq" path="res://src/map/dungeon/code/MonsterRoom.cs" id="2_pu81k"]
|
||||
@@ -700,6 +700,9 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_jks6o")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_pu81k"]
|
||||
size = Vector3(2.12268, 5.82227, 1.63702)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bnx07"]
|
||||
albedo_texture = ExtResource("3_xx585")
|
||||
texture_filter = 0
|
||||
@@ -752,6 +755,8 @@ mesh = SubResource("ArrayMesh_sx1ls")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="BasinRoom/BASIN_ROOM_VER2"]
|
||||
collision_layer = 2147483649
|
||||
collision_mask = 2147483649
|
||||
|
||||
[node name="ROOM_001" type="MeshInstance3D" parent="BasinRoom/BASIN_ROOM_VER2/StaticBody3D"]
|
||||
transform = Transform3D(0.35918, 0, 0, 0, 0.287429, 0, 0, 0, 0.287429, -3.6523, 13.6997, 102.523)
|
||||
@@ -829,9 +834,17 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6.55, -2.55692, 0)
|
||||
[node name="ItemDatabase" parent="BasinRoom/BASIN_ROOM_VER2" instance=ExtResource("18_bwap2")]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="TeleportSpawn" type="Marker3D" parent="BasinRoom/BASIN_ROOM_VER2"]
|
||||
unique_name_in_owner = true
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.28791, 10.2563, 106.274)
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="BasinRoom/BASIN_ROOM_VER2"]
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D7" type="CollisionShape3D" parent="BasinRoom/BASIN_ROOM_VER2/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.86587, 12.1211, 94.6461)
|
||||
shape = SubResource("BoxShape3D_pu81k")
|
||||
|
||||
[node name="CollisionShape3D8" type="CollisionShape3D" parent="BasinRoom/BASIN_ROOM_VER2/StaticBody3D2"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.03197, 12.1211, 94.7863)
|
||||
shape = SubResource("BoxShape3D_pu81k")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="BasinRoom"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0382157, 4.21368, -0.0118849)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[gd_scene load_steps=36 format=4 uid="uid://bn4gslp2gk8ds"]
|
||||
[gd_scene load_steps=38 format=4 uid="uid://bn4gslp2gk8ds"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://fk3jis6rsipv" path="res://src/map/dungeon/code/corridor.gd" id="1_lepkf"]
|
||||
[ext_resource type="Texture2D" uid="uid://crsw35eypj6ry" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_WALL TILE 1.jpg" id="2_jmyyj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dpv6gobmdhgq5" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_TILE4.png" id="3_d7rg7"]
|
||||
[ext_resource type="Texture2D" uid="uid://ldk1iveo0da5" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_brick_corridor_corrected.png" id="4_7fcpj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnka6wb7edep0" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_lower_corridor_lower.png" id="5_qnt5r"]
|
||||
[ext_resource type="Texture2D" uid="uid://bb4i5iu6c0jrt" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_lower_corridor_lower.png" id="5_qnt5r"]
|
||||
[ext_resource type="Texture2D" uid="uid://db1toc6kj5uq8" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_darkbrick.png" id="6_liffc"]
|
||||
[ext_resource type="Texture2D" uid="uid://3f43egfmyocx" path="res://src/map/dungeon/models/Set A/18. Corridor A/18_A1_CORRIDOR_A_concrete_0003_color_1k.png" id="7_3kayh"]
|
||||
|
||||
@@ -428,6 +428,9 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_etli6")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_d16dk"]
|
||||
size = Vector3(0.236, 5.538, 0.149)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2qrwe"]
|
||||
transparency = 1
|
||||
shading_mode = 0
|
||||
@@ -493,6 +496,9 @@ _surfaces = [{
|
||||
blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_p4f4g")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_gbjb2"]
|
||||
size = Vector3(4.40063, 4, 1.67725)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lepkf"]
|
||||
transparency = 1
|
||||
albedo_color = Color(1, 1, 1, 0)
|
||||
@@ -700,6 +706,24 @@ transform = Transform3D(2, 0, 0, 0, 0.10779, 0, 0, 0, 2, -9.92441, 3.92578, 0.91
|
||||
mesh = SubResource("ArrayMesh_pjk1a")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="18_A1_CORRIDOR_A"]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="18_A1_CORRIDOR_A/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.7192, 2.25405, -0.816737)
|
||||
shape = SubResource("BoxShape3D_d16dk")
|
||||
|
||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="18_A1_CORRIDOR_A/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.13273, 2.03746, -0.752249)
|
||||
shape = SubResource("BoxShape3D_d16dk")
|
||||
|
||||
[node name="CollisionShape3D3" type="CollisionShape3D" parent="18_A1_CORRIDOR_A/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.14647, 1.81901, 2.73139)
|
||||
shape = SubResource("BoxShape3D_d16dk")
|
||||
|
||||
[node name="CollisionShape3D4" type="CollisionShape3D" parent="18_A1_CORRIDOR_A/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -11.637, 2.14158, 2.73139)
|
||||
shape = SubResource("BoxShape3D_d16dk")
|
||||
|
||||
[node name="DOOR?_F_CUT" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.0339368, -0.095025, 1.87165)
|
||||
use_collision = true
|
||||
@@ -711,6 +735,14 @@ transform = Transform3D(-2, 0, 1.74846e-07, 0, 0.10779, 0, -1.74846e-07, 0, -2,
|
||||
mesh = SubResource("ArrayMesh_ux4sw")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="DOOR?_F_CUT"]
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DOOR?_F_CUT/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0286865, 0, 0.463623)
|
||||
shape = SubResource("BoxShape3D_gbjb2")
|
||||
|
||||
[node name="DOOR?_R_CUT" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -1.87415, -0.109414, -0.094615)
|
||||
use_collision = true
|
||||
@@ -722,6 +754,13 @@ transform = Transform3D(-8.74228e-08, 0, -2, 0, 0.10779, 0, 2, 0, -8.74228e-08,
|
||||
mesh = SubResource("ArrayMesh_tmqha")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="DOOR?_R_CUT"]
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DOOR?_R_CUT/StaticBody3D"]
|
||||
shape = SubResource("BoxShape3D_gbjb2")
|
||||
|
||||
[node name="DOOR?_L_CUT" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 1.98471, -0.0715388, -0.0946158)
|
||||
use_collision = true
|
||||
@@ -733,6 +772,13 @@ transform = Transform3D(-8.74228e-08, 0, -2, 0, 0.10779, 0, 2, 0, -8.74228e-08,
|
||||
mesh = SubResource("ArrayMesh_o04ue")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="DOOR?_L_CUT"]
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DOOR?_L_CUT/StaticBody3D"]
|
||||
shape = SubResource("BoxShape3D_gbjb2")
|
||||
|
||||
[node name="DOOR?_B_CUT" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -0.0339377, -0.127415, -2.00389)
|
||||
use_collision = true
|
||||
@@ -743,3 +789,10 @@ material = SubResource("StandardMaterial3D_4xu2u")
|
||||
transform = Transform3D(-2, 0, 1.74846e-07, 0, 0.10779, 0, -1.74846e-07, 0, -2, 0.00432197, 2.0282, -1.92743)
|
||||
mesh = SubResource("ArrayMesh_ue4n7")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="DOOR?_B_CUT"]
|
||||
collision_layer = 2147483648
|
||||
collision_mask = 2147483648
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="DOOR?_B_CUT/StaticBody3D"]
|
||||
shape = SubResource("BoxShape3D_gbjb2")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=50 format=4 uid="uid://cihbmyo0ltq4m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="1_3m472"]
|
||||
[ext_resource type="Script" path="res://src/map/dungeon/code/ExitRoom.cs" id="2_umdkt"]
|
||||
[ext_resource type="Script" uid="uid://bd824eigybu51" path="res://src/map/dungeon/code/ExitRoom.cs" id="2_umdkt"]
|
||||
[ext_resource type="Texture2D" uid="uid://ct3qjmo0yg3gc" path="res://src/map/dungeon/models/Set A/19. Floor Exit A/19_A1_FLOOR_EXIT_A_darkbrick.png" id="3_umdkt"]
|
||||
[ext_resource type="Texture2D" uid="uid://q4hj2tj6drv" path="res://src/map/dungeon/models/Set A/19. Floor Exit A/19_A1_FLOOR_EXIT_A_concrete_0003_color_1k.png" id="4_daunu"]
|
||||
[ext_resource type="Texture2D" uid="uid://cuy0ep1w6uxqf" path="res://src/map/dungeon/models/Set A/19. Floor Exit A/19_A1_FLOOR_EXIT_A_TILE4.png" id="5_7230f"]
|
||||
@@ -447,7 +447,7 @@ shadow_mesh = SubResource("ArrayMesh_1s3g5")
|
||||
size = Vector3(0.391602, 21, 37)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_daunu"]
|
||||
size = Vector3(0.628906, 21, 6.86426)
|
||||
size = Vector3(0.0434814, 21, 6.864)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_7230f"]
|
||||
size = Vector3(4.66064, 21, 19.2147)
|
||||
@@ -513,7 +513,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 9.76518, -4, -3)
|
||||
shape = SubResource("BoxShape3D_umdkt")
|
||||
|
||||
[node name="CollisionShape3D3" type="CollisionShape3D" parent="Floor Exit A/19_A1_FLOOR_EXIT_A/StaticBody3D"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5.93701, -4, 14.8145)
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 5.93701, -4, 15.1188)
|
||||
shape = SubResource("BoxShape3D_daunu")
|
||||
|
||||
[node name="CollisionShape3D4" type="CollisionShape3D" parent="Floor Exit A/19_A1_FLOOR_EXIT_A/StaticBody3D"]
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://nngpj0l0bbbq" path="res://src/map/dungeon/models/Set B/23. Antechamber D/23_A2_ANTECHAMBER_TYPE_D_WHITE_TILE2.png" id="6_heel6"]
|
||||
[ext_resource type="Texture2D" uid="uid://cd6nc8wetejsl" path="res://src/map/dungeon/models/Set B/23. Antechamber D/23_A2_ANTECHAMBER_TYPE_D_AREA_2_MAIN_STON2E.png" id="7_gsrc6"]
|
||||
[ext_resource type="Texture2D" uid="uid://b0xcpq10u3ny3" path="res://src/map/dungeon/models/Set B/23. Antechamber D/23_A2_ANTECHAMBER_TYPE_D_AREA_2_MAIN_222STONE.png" id="8_sbtpa"]
|
||||
[ext_resource type="Texture2D" uid="uid://dcwgcwnp1i6mi" path="res://src/map/dungeon/models/Set B/23. Antechamber D/23_A2_ANTECHAMBER_TYPE_D_swirled_column _AREA222.png" id="9_qldgi"]
|
||||
[ext_resource type="Texture2D" uid="uid://bjweptdtrd8oo" path="res://src/map/dungeon/models/Set B/23. Antechamber D/23_A2_ANTECHAMBER_TYPE_D_swirled_column _AREA222.png" id="9_qldgi"]
|
||||
[ext_resource type="Texture2D" uid="uid://doov3g0rlm684" path="res://src/map/dungeon/models/Set B/23. Antechamber D/23_A2_ANTECHAMBER_TYPE_D_lime_hand_relief.png" id="10_4gu5y"]
|
||||
[ext_resource type="PackedScene" uid="uid://twrj4wixcbu7" path="res://src/items/ItemDatabase.tscn" id="11_31dr0"]
|
||||
[ext_resource type="Script" uid="uid://yl7wyeo5m725" path="res://src/map/dungeon/code/remove_unused_doors.gd" id="12_ss60s"]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
[ext_resource type="Texture2D" uid="uid://b56jom8egc532" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_AREA_2_MAIN_STONE.png" id="3_dhi6g"]
|
||||
[ext_resource type="Texture2D" uid="uid://cu3jfu4npfjtv" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_area_2_big_tile.png" id="4_uwyye"]
|
||||
[ext_resource type="Texture2D" uid="uid://bx04tlo8jdbvh" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_area_2_tile_3.png" id="5_jmhln"]
|
||||
[ext_resource type="Texture2D" uid="uid://x6syr6fsdeap" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_AREA_2_MAIN_STON2E.png" id="6_itdxo"]
|
||||
[ext_resource type="Texture2D" uid="uid://8cq4tiia1ewt" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_AREA_2_MAIN_STON2E.png" id="6_itdxo"]
|
||||
[ext_resource type="Texture2D" uid="uid://blrsq3kjknet1" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_DARKER_STONE_AREA_2.png" id="7_axa2u"]
|
||||
[ext_resource type="Texture2D" uid="uid://bnju42dsf1t4i" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_CEILING_AREA2.jpg" id="8_tvrlh"]
|
||||
[ext_resource type="Texture2D" uid="uid://fjw3m05oexns" path="res://src/map/dungeon/models/Set B/25. Pedestal Room/25_A2_PEDESTAL_ROOM_STONE_PANEL_AREA2png.png" id="9_3ytot"]
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
[ext_resource type="Script" uid="uid://dhollu4j3pynq" path="res://src/map/dungeon/code/MonsterRoom.cs" id="2_i2lux"]
|
||||
[ext_resource type="Texture2D" uid="uid://br0mmudsrjvjr" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_COLUMN_WHITE.png" id="3_jpe4o"]
|
||||
[ext_resource type="Texture2D" uid="uid://6ij2st3pptd0" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_area_2_big_tile.png" id="4_euk7n"]
|
||||
[ext_resource type="Texture2D" uid="uid://bfk41l5tsd80c" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_area_2_tile_3.png" id="5_wmaqp"]
|
||||
[ext_resource type="Texture2D" uid="uid://ds1x87881eftw" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_area_2_tile_stained_2.png" id="6_4ad6e"]
|
||||
[ext_resource type="Texture2D" uid="uid://cdcufn741ylbi" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_area_2_tile_3.png" id="5_wmaqp"]
|
||||
[ext_resource type="Texture2D" uid="uid://cx815j3kde7w0" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_area_2_tile_stained_2.png" id="6_4ad6e"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca4e03ukcga36" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_AREA_2_MAIN_STONE.png" id="7_7yuos"]
|
||||
[ext_resource type="Texture2D" uid="uid://bk38oftqvqp8o" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_WHITE_floor.png" id="8_h5vd2"]
|
||||
[ext_resource type="Texture2D" uid="uid://ch4vi8pr3dd01" path="res://src/map/dungeon/models/Set B/29. Column Circle Room/29_A2_COLUMN_CIRCLE_ROOM_WHITE_layer_brick1.png" id="9_3yy2v"]
|
||||
|
||||
35
src/test/NavigationTestScene.tscn
Normal file
35
src/test/NavigationTestScene.tscn
Normal file
@@ -0,0 +1,35 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://010r1fbkbooa"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://cfecvvav8kkp6" path="res://src/player/Player.tscn" id="1_7xhku"]
|
||||
[ext_resource type="PackedScene" uid="uid://bksq62muhk3h5" path="res://src/enemy/enemy_types/1. sproingy/Sproingy.tscn" id="2_3keei"]
|
||||
|
||||
[sub_resource type="NavigationMesh" id="NavigationMesh_3keei"]
|
||||
vertices = PackedVector3Array(-2.96237, 1.33137, -10.8745, -1.71237, 1.33137, -10.8745, -1.71237, 1.33137, -22.6245, -5.46237, 1.33137, -9.12453, -21.7124, 1.33137, -6.12453, -6.46237, 1.33137, -6.12453, -21.7124, 1.33137, -22.6245, 3.03763, 1.33137, -7.62453, 3.28763, 1.33137, -6.12453, 10.0376, 1.33137, -6.12453, 1.53763, 1.33137, -9.87453, -0.462372, 1.33137, -10.8745, 10.0376, 1.33137, -22.6245, -1.71237, 1.33137, 9.37547, -1.71237, 1.33137, -1.37453, -2.71237, 1.33137, -1.37453, -5.46237, 1.33137, -3.12453, -21.7124, 1.33137, 9.37547, 1.53763, 1.33137, -2.37453, -0.462372, 1.33137, -1.37453, 10.0376, 1.33137, 9.37547)
|
||||
polygons = [PackedInt32Array(2, 1, 0), PackedInt32Array(2, 0, 3), PackedInt32Array(3, 5, 2), PackedInt32Array(2, 5, 4), PackedInt32Array(2, 4, 6), PackedInt32Array(9, 8, 7), PackedInt32Array(9, 7, 10), PackedInt32Array(10, 11, 9), PackedInt32Array(9, 11, 2), PackedInt32Array(9, 2, 12), PackedInt32Array(11, 1, 2), PackedInt32Array(15, 14, 13), PackedInt32Array(16, 15, 13), PackedInt32Array(16, 13, 5), PackedInt32Array(5, 13, 4), PackedInt32Array(4, 13, 17), PackedInt32Array(18, 8, 9), PackedInt32Array(13, 14, 19), PackedInt32Array(18, 9, 19), PackedInt32Array(19, 9, 13), PackedInt32Array(13, 9, 20)]
|
||||
cell_height = 0.5
|
||||
agent_radius = 3.0
|
||||
|
||||
[sub_resource type="CylinderShape3D" id="CylinderShape3D_3keei"]
|
||||
height = 4.74658
|
||||
radius = 1.71777
|
||||
|
||||
[node name="Node3D" type="Node3D"]
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_7xhku")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.791832, 0)
|
||||
|
||||
[node name="Sproingy" parent="." instance=ExtResource("2_3keei")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.64783, -11.9575)
|
||||
|
||||
[node name="NavigationRegion3D" type="NavigationRegion3D" parent="."]
|
||||
navigation_mesh = SubResource("NavigationMesh_3keei")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="NavigationRegion3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.79317, 0, -6.66189)
|
||||
size = Vector3(37.8384, 1, 37.9253)
|
||||
|
||||
[node name="StaticBody3D" type="StaticBody3D" parent="NavigationRegion3D"]
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="NavigationRegion3D/StaticBody3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.61432, 1.20466, -6.13947)
|
||||
shape = SubResource("CylinderShape3D_3keei")
|
||||
Reference in New Issue
Block a user