From a7381658f448c14eaa15c41754cc24c8fa03d52b Mon Sep 17 00:00:00 2001 From: Zenny Date: Wed, 9 Apr 2025 22:45:00 -0700 Subject: [PATCH] Add debug menu, add ability to load next floor or spawn item --- .../Entity/IKillable.cs | 2 +- Zennysoft.Game.Ma/project.godot | 5 + Zennysoft.Game.Ma/src/enemy/Enemy.cs | 4 +- .../src/enemy/INavigationAgentClient.cs | 2 + .../src/enemy/NavigationAgentClient.cs | 60 ++++---- .../enemy_types/01. sproingy/Sproingy.cs | 6 + .../enemy/enemy_types/02. michael/Michael.cs | 8 +- .../src/enemy/enemy_types/04. sara/Sara.cs | 6 + .../enemy/enemy_types/05. ballos/Ballos.cs | 9 +- .../05. ballos/BallosModelView.tscn | 2 +- .../enemy_types/06. chariot/Chariot.tscn | 1 + .../06. chariot/ChariotModelView.tscn | 2 +- .../enemy/enemy_types/07. chinthe/Chinthe.cs | 8 +- .../enemy_types/08a. Ambassador/Ambassador.cs | 6 + .../src/enemy/enemy_types/09. Agi/AgiDemon.cs | 7 + .../src/enemy/enemy_types/11. Palan/Palan.cs | 7 + .../12. Shield of Heaven/ShieldOfHeaven.cs | 7 + .../enemy_types/16. demon wall/DemonWall.tscn | 21 +-- .../16. demon wall/DemonWallModelView.tscn | 24 ++++ .../9b. Aqueos Demon/AqueosDemon.tscn | 15 +- .../src/enemy/state/EnemyLogic.g.puml | 4 +- Zennysoft.Game.Ma/src/game/Game.cs | 16 +++ .../src/inventory_menu/InventoryMenu.tscn | 16 +-- Zennysoft.Game.Ma/src/items/armor/Armor.cs | 9 +- .../src/items/armor/resources/Acceptance.tres | 23 +-- .../items/weapons/resources/Atonement.tres | 13 +- .../items/weapons/resources/MysteryRod.tres | 4 +- .../src/map/dungeon/code/MonsterRoom.cs | 2 +- .../src/map/dungeon/floors/Floor01.tscn | 136 ++++-------------- Zennysoft.Game.Ma/src/menu/DebugMenu.tscn | 84 +++++++++++ Zennysoft.Game.Ma/src/player/Player.tscn | 6 +- .../src/ui/in_game_ui/InGameUI.cs | 2 + .../src/ui/in_game_ui/InGameUI.tscn | 8 +- .../src/ui/pause_menu/DebugMenu.cs.uid | 1 + .../src/ui/pause_menu/IDebugMenu.cs | 5 + .../src/ui/pause_menu/IDebugMenu.cs.uid | 1 + .../src/ui/pause_menu/PauseDebugMenu.cs | 58 ++++++++ .../src/ui/pause_menu/PauseDebugMenu.cs.uid | 1 + .../src/ui/pause_menu/PauseMenu.tscn | 30 ++-- 39 files changed, 411 insertions(+), 210 deletions(-) create mode 100644 Zennysoft.Game.Ma/src/menu/DebugMenu.tscn create mode 100644 Zennysoft.Game.Ma/src/ui/pause_menu/DebugMenu.cs.uid create mode 100644 Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs create mode 100644 Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs.uid create mode 100644 Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs create mode 100644 Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs.uid diff --git a/Zennysoft.Game.Abstractions/Entity/IKillable.cs b/Zennysoft.Game.Abstractions/Entity/IKillable.cs index 308af4e4..f4f89955 100644 --- a/Zennysoft.Game.Abstractions/Entity/IKillable.cs +++ b/Zennysoft.Game.Abstractions/Entity/IKillable.cs @@ -2,5 +2,5 @@ public interface IKillable { - public void Die(); + public abstract void Die(); } diff --git a/Zennysoft.Game.Ma/project.godot b/Zennysoft.Game.Ma/project.godot index 416cee45..88ae5d3c 100644 --- a/Zennysoft.Game.Ma/project.godot +++ b/Zennysoft.Game.Ma/project.godot @@ -203,6 +203,11 @@ Load={ "events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":10,"pressure":0.0,"pressed":true,"script":null) ] } +Debug={ +"deadzone": 0.2, +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":4,"pressure":0.0,"pressed":true,"script":null) +] +} [internationalization] diff --git a/Zennysoft.Game.Ma/src/enemy/Enemy.cs b/Zennysoft.Game.Ma/src/enemy/Enemy.cs index a53bd319..7d2c91a2 100644 --- a/Zennysoft.Game.Ma/src/enemy/Enemy.cs +++ b/Zennysoft.Game.Ma/src/enemy/Enemy.cs @@ -87,7 +87,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide _lineOfSight.BodyEntered += LineOfSight_BodyEntered; } - public void OnProcess(double delta) + public override void _Process(double delta) { if (CurrentHP.Value <= 0) return; @@ -159,7 +159,7 @@ public partial class Enemy : CharacterBody3D, IEnemy, IProvide _knockbackStrength = 0.3f; } - public void Die() + public virtual void Die() { SetProcess(false); CurrentHP.OnNext(0); diff --git a/Zennysoft.Game.Ma/src/enemy/INavigationAgentClient.cs b/Zennysoft.Game.Ma/src/enemy/INavigationAgentClient.cs index 68b759a7..d34079e0 100644 --- a/Zennysoft.Game.Ma/src/enemy/INavigationAgentClient.cs +++ b/Zennysoft.Game.Ma/src/enemy/INavigationAgentClient.cs @@ -9,4 +9,6 @@ public interface INavigationAgentClient public void SetTarget(Vector3 target); public bool IsAvoidanceEnabled { get; } + + public void Stop(); } diff --git a/Zennysoft.Game.Ma/src/enemy/NavigationAgentClient.cs b/Zennysoft.Game.Ma/src/enemy/NavigationAgentClient.cs index d5f232ef..e3536345 100644 --- a/Zennysoft.Game.Ma/src/enemy/NavigationAgentClient.cs +++ b/Zennysoft.Game.Ma/src/enemy/NavigationAgentClient.cs @@ -22,39 +22,45 @@ public partial class NavigationAgentClient : Node3D, INavigationAgentClient public void Setup() { - NavAgent.VelocityComputed += NavAgent_VelocityComputed; - NavAgent.TargetReached += NavAgent_TargetReached; + NavAgent.VelocityComputed += NavAgent_VelocityComputed; + NavAgent.TargetReached += NavAgent_TargetReached; - var rng = new RandomNumberGenerator(); - rng.Randomize(); - _patrolTimer.Timeout += OnPatrolTimeout; - _patrolTimer.WaitTime = rng.RandfRange(7.0f, 15.0f); + var rng = new RandomNumberGenerator(); + rng.Randomize(); + _patrolTimer.Timeout += OnPatrolTimeout; + _patrolTimer.WaitTime = rng.RandfRange(7.0f, 15.0f); - _thinkTimer = new Timer - { - WaitTime = 0.4f - }; - AddChild(_thinkTimer); - _thinkTimer.Timeout += NavAgent_TargetReached; - _thinkTimer.Start(); + _thinkTimer = new Timer + { + WaitTime = 0.4f + }; + AddChild(_thinkTimer); + _thinkTimer.Timeout += NavAgent_TargetReached; + _thinkTimer.Start(); + } + + public void Stop() + { + _patrolTimer.Stop(); + _thinkTimer.Stop(); } private void NavAgent_VelocityComputed(Vector3 safeVelocity) { - if (!_canMove) - return; + if (!_canMove) + return; - var enemy = GetOwner() as IEnemy; - enemy.Move(safeVelocity); + var enemy = GetOwner() as IEnemy; + enemy.Move(safeVelocity); } public void CalculateVelocity(Vector3 currentPosition, bool canMove) { - _canMove = canMove; - var nextPathPosition = NavAgent.GetNextPathPosition(); + _canMove = canMove; + var nextPathPosition = NavAgent.GetNextPathPosition(); - var newVelocity = currentPosition.DirectionTo(nextPathPosition) * 2f; - NavAgent.Velocity = newVelocity; + var newVelocity = currentPosition.DirectionTo(nextPathPosition) * 2f; + NavAgent.Velocity = newVelocity; } public void SetTarget(Vector3 target) => Task.Delay(TimeSpan.FromSeconds(0.4)).ContinueWith(_ => _currentTarget = new Vector3(target.X, -1.75f, target.Z)); @@ -63,15 +69,15 @@ public partial class NavigationAgentClient : Node3D, INavigationAgentClient private void NavAgent_TargetReached() { - NavAgent.TargetPosition = _currentTarget; + NavAgent.TargetPosition = _currentTarget; } private void OnPatrolTimeout() { - var rng = new RandomNumberGenerator(); - rng.Randomize(); - _patrolTimer.WaitTime = rng.RandfRange(5.0f, 10.0f); - var enemy = GetOwner() as ICanPatrol; - enemy.Patrol(); + var rng = new RandomNumberGenerator(); + rng.Randomize(); + _patrolTimer.WaitTime = rng.RandfRange(5.0f, 10.0f); + var enemy = GetOwner() as ICanPatrol; + enemy.Patrol(); } } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/Sproingy.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/Sproingy.cs index 4e9e8500..ba3c43b3 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/Sproingy.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/Sproingy.cs @@ -48,6 +48,12 @@ public partial class Sproingy : Enemy, IHasPrimaryAttack, ICanPatrol PrimaryAttack(); } + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.cs index a6ec85ad..019bebdf 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/Michael.cs @@ -22,7 +22,7 @@ public partial class Michael : Enemy, IHasPrimaryAttack, ICanPatrol ((EnemyModelView2D)_enemyModelView).Hitbox.AreaEntered += Hitbox_AreaEntered; } - public new void OnPhysicsProcess(double delta) + public void OnPhysicsProcess(double delta) { _enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta)); @@ -38,6 +38,12 @@ public partial class Michael : Enemy, IHasPrimaryAttack, ICanPatrol base._PhysicsProcess(delta); } + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public override void TakeAction() { PrimaryAttack(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/Sara.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/Sara.cs index c0627ad1..87022bf5 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/Sara.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/Sara.cs @@ -57,6 +57,12 @@ public partial class Sara : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICanP options[(int)selection].Invoke(); } + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/Ballos.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/Ballos.cs index e282f3e0..ed0b5f3b 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/Ballos.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/Ballos.cs @@ -30,7 +30,7 @@ public partial class Ballos : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICa ((EnemyModelView2D)_enemyModelView).Hitbox.AreaEntered += Hitbox_AreaEntered; } - public new void OnPhysicsProcess(double delta) + public void OnPhysicsProcess(double delta) { _enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta)); @@ -53,6 +53,13 @@ public partial class Ballos : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICa var selection = rng.RandWeighted([0.875f, 0.125f]); options[(int)selection].Invoke(); } + + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn index 490ee94d..e3d41e6f 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/05. ballos/BallosModelView.tscn @@ -1594,7 +1594,7 @@ states/secondary_attack_left/position = Vector2(1349.83, 315) states/secondary_attack_right/node = SubResource("AnimationNodeAnimation_smxxh") states/secondary_attack_right/position = Vector2(1052, 464.749) transitions = ["idle_front_walk", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_3xv6a"), "idle_left_walk", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_0h1op"), "idle_front_walk", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_361b7"), "idle_back_walk", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_wftla"), "idle_back_walk", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_gqqkl"), "idle_left_walk", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_5cj36"), "idle_front_walk", "primary_attack", SubResource("AnimationNodeStateMachineTransition_4t05h"), "idle_back_walk", "primary_attack", SubResource("AnimationNodeStateMachineTransition_bmy1k"), "idle_left_walk", "primary_attack", SubResource("AnimationNodeStateMachineTransition_mxl7w"), "Start", "idle_front", SubResource("AnimationNodeStateMachineTransition_qq0ru"), "idle_front", "idle_back", SubResource("AnimationNodeStateMachineTransition_c54uj"), "idle_back", "idle_left", SubResource("AnimationNodeStateMachineTransition_qmo72"), "idle_left", "idle_front", SubResource("AnimationNodeStateMachineTransition_jyt1n"), "idle_left", "idle_back", SubResource("AnimationNodeStateMachineTransition_5un2v"), "idle_back", "idle_front", SubResource("AnimationNodeStateMachineTransition_2x3nl"), "idle_front", "idle_left", SubResource("AnimationNodeStateMachineTransition_6a5nw"), "idle_back", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_0jqty"), "idle_front", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_yjcrh"), "idle_back", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_2ybyh"), "idle_left", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_n454k"), "idle_back_walk", "idle_left", SubResource("AnimationNodeStateMachineTransition_vrcjv"), "idle_back_walk", "idle_front", SubResource("AnimationNodeStateMachineTransition_h1yxw"), "idle_back_walk", "idle_back", SubResource("AnimationNodeStateMachineTransition_kg6hd"), "idle_back", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_25i3y"), "idle_left", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_5g722"), "idle_front", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_a6y4x"), "idle_left_walk", "idle_front", SubResource("AnimationNodeStateMachineTransition_7y7m4"), "idle_left_walk", "idle_left", SubResource("AnimationNodeStateMachineTransition_ldcvv"), "idle_left_walk", "idle_back", SubResource("AnimationNodeStateMachineTransition_aalmk"), "idle_front_walk", "idle_back", SubResource("AnimationNodeStateMachineTransition_2le5t"), "idle_front_walk", "idle_front", SubResource("AnimationNodeStateMachineTransition_4nmgu"), "idle_front_walk", "idle_left", SubResource("AnimationNodeStateMachineTransition_mw5r6"), "idle_front", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_jbtxi"), "idle_left", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_mjxlk"), "idle_back", "primary_attack", SubResource("AnimationNodeStateMachineTransition_al2xs"), "idle_front", "primary_attack", SubResource("AnimationNodeStateMachineTransition_irq32"), "primary_attack", "idle_front", SubResource("AnimationNodeStateMachineTransition_2khaq"), "idle_left", "primary_attack", SubResource("AnimationNodeStateMachineTransition_k7x0x"), "idle_right", "idle_front", SubResource("AnimationNodeStateMachineTransition_ivy74"), "idle_front", "idle_right", SubResource("AnimationNodeStateMachineTransition_x7uye"), "idle_right", "idle_left", SubResource("AnimationNodeStateMachineTransition_djeua"), "idle_left", "idle_right", SubResource("AnimationNodeStateMachineTransition_8wbs7"), "idle_right", "idle_back", SubResource("AnimationNodeStateMachineTransition_mnr4r"), "idle_back", "idle_right", SubResource("AnimationNodeStateMachineTransition_l2wq1"), "idle_right", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_7hf3j"), "idle_right", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_jwlar"), "idle_right", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_fdoul"), "idle_front_walk", "idle_right", SubResource("AnimationNodeStateMachineTransition_kpotx"), "idle_back_walk", "idle_right", SubResource("AnimationNodeStateMachineTransition_lfuuf"), "idle_left_walk", "idle_right", SubResource("AnimationNodeStateMachineTransition_dfvqa"), "idle_right", "primary_attack", SubResource("AnimationNodeStateMachineTransition_dnvt3"), "idle_front_walk", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_at0w8"), "idle_right_walk", "idle_front_walk", SubResource("AnimationNodeStateMachineTransition_afod7"), "idle_right_walk", "idle_left_walk", SubResource("AnimationNodeStateMachineTransition_dwhw7"), "idle_left_walk", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_qjloj"), "idle_right_walk", "idle_back_walk", SubResource("AnimationNodeStateMachineTransition_7uqwg"), "idle_back_walk", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_k4jom"), "idle_right_walk", "idle_left", SubResource("AnimationNodeStateMachineTransition_ku0f8"), "idle_left", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_fwynu"), "idle_right_walk", "idle_back", SubResource("AnimationNodeStateMachineTransition_t7vd7"), "idle_back", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_tv4ou"), "idle_right_walk", "idle_front", SubResource("AnimationNodeStateMachineTransition_0b3yx"), "idle_front", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_ysi80"), "idle_right_walk", "idle_right", SubResource("AnimationNodeStateMachineTransition_ktp1h"), "idle_right", "idle_right_walk", SubResource("AnimationNodeStateMachineTransition_1cx5a"), "idle_right_walk", "primary_attack", SubResource("AnimationNodeStateMachineTransition_fn67p"), "primary_attack_left", "primary_attack", SubResource("AnimationNodeStateMachineTransition_6qb08"), "primary_attack", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_5ap7h"), "primary_attack_back", "primary_attack", SubResource("AnimationNodeStateMachineTransition_dde6r"), "primary_attack_right", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_5a80x"), "primary_attack_back", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_cwnal"), "primary_attack_right", "primary_attack", SubResource("AnimationNodeStateMachineTransition_ik0ko"), "primary_attack", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_7h3pp"), "primary_attack_right", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_te4ac"), "primary_attack_left", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_skhgh"), "primary_attack_left", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_j8po0"), "primary_attack_back", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_cvb6o"), "primary_attack_left", "idle_left", SubResource("AnimationNodeStateMachineTransition_qrpvt"), "primary_attack_right", "idle_right", SubResource("AnimationNodeStateMachineTransition_obci0"), "primary_attack_back", "idle_back", SubResource("AnimationNodeStateMachineTransition_cuv27"), "idle_front", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_ach2p"), "idle_right", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_8cyro"), "idle_back", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_4fl8s"), "idle_left", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_ykv10"), "idle_front_walk", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_hbwwn"), "idle_right_walk", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_gcl0k"), "idle_left_walk", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_o3f25"), "idle_back_walk", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_r7yhf"), "idle_right", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_516bs"), "idle_front", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_wiojf"), "idle_left", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_fgvwe"), "idle_back", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_1lijp"), "idle_front_walk", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_3pd83"), "idle_right_walk", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_wyiwg"), "idle_back_walk", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_l1dx6"), "idle_left_walk", "primary_attack_right", SubResource("AnimationNodeStateMachineTransition_57oo3"), "idle_right", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_tpmfr"), "idle_front", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_8hjrx"), "idle_back", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_ouq20"), "idle_left", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_1a3du"), "idle_front_walk", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_ymlkb"), "idle_right_walk", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_7u4wg"), "idle_left_walk", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_oatu2"), "idle_back_walk", "primary_attack_back", SubResource("AnimationNodeStateMachineTransition_ynkt4"), "secondary_attack", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_7a6is"), "secondary_attack_right", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_u5xjp"), "secondary_attack", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_5cwnl"), "secondary_attack_left", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_e0gee"), "secondary_attack", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_mno7m"), "secondary_attack_back", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_4h5gj"), "secondary_attack_left", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_e5pq0"), "secondary_attack_back", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_wka7s"), "secondary_attack_back", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_8jscc"), "secondary_attack_right", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_7vrs0"), "secondary_attack_left", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_20678"), "secondary_attack_right", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_k6da7"), "idle_front", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_eslbn"), "idle_front", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_krqul"), "idle_front", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_pyy2h"), "idle_front", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_smxxh"), "idle_right", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_at0n1"), "idle_right", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_svg22"), "idle_right", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_s7lar"), "idle_right", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_akobn"), "idle_left", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_bsqna"), "idle_left", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_gol4k"), "idle_left", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_p4ilm"), "idle_left", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_k83sm"), "idle_back", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_kcq25"), "idle_back", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_01v4k"), "idle_back", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_jltoa"), "idle_back", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_oimc0"), "idle_front_walk", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_xcm4a"), "idle_front_walk", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_ddwwq"), "idle_front_walk", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_n4eka"), "idle_front_walk", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_ec8sv"), "idle_left_walk", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_g2s00"), "idle_left_walk", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_yqxd5"), "idle_left_walk", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_maccb"), "idle_left_walk", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_5xhee"), "idle_back_walk", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_503vp"), "idle_back_walk", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_7y3hb"), "idle_back_walk", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_h8dgw"), "idle_back_walk", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_nvud8"), "idle_right_walk", "secondary_attack", SubResource("AnimationNodeStateMachineTransition_nsjll"), "idle_right_walk", "secondary_attack_left", SubResource("AnimationNodeStateMachineTransition_rwn6o"), "idle_right_walk", "secondary_attack_right", SubResource("AnimationNodeStateMachineTransition_rqeru"), "idle_right_walk", "secondary_attack_back", SubResource("AnimationNodeStateMachineTransition_5qfjk"), "secondary_attack", "idle_front", SubResource("AnimationNodeStateMachineTransition_uyx05"), "secondary_attack_right", "idle_right", SubResource("AnimationNodeStateMachineTransition_6io2i"), "secondary_attack_left", "idle_left", SubResource("AnimationNodeStateMachineTransition_7jav2"), "secondary_attack_back", "idle_back", SubResource("AnimationNodeStateMachineTransition_c1hmo"), "primary_attack", "primary_attack_left", SubResource("AnimationNodeStateMachineTransition_yu2km")] -graph_offset = Vector2(-543.982, -364.173) +graph_offset = Vector2(-543.982, -425.313) [node name="EnemyModelView" type="Node3D"] script = ExtResource("1_ueqp5") diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/Chariot.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/Chariot.tscn index a005f5e9..83d02c30 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/Chariot.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/Chariot.tscn @@ -80,6 +80,7 @@ shape = SubResource("SphereShape3D_lqifn") [node name="EnemyModelView" parent="." instance=ExtResource("3_q1q0f")] unique_name_in_owner = true +transform = Transform3D(0.999848, 0, 0.0174524, 0, 1, 0, -0.0174524, 0, 0.999848, 0, 0, 0) [node name="Raycast" type="RayCast3D" parent="."] unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.tscn index e647de91..c84ee77e 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.tscn @@ -6952,7 +6952,7 @@ script = ExtResource("1_ol7va") EnemyLoreInfo = SubResource("Resource_500at") [node name="Sprite3D" type="Sprite3D" parent="."] -transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 2, 0) +transform = Transform3D(-1.5, 0, -1.31134e-07, 0, 1.5, 0, 1.31134e-07, 0, -1.5, 0, 0, 0) billboard = 2 alpha_cut = 1 texture_filter = 0 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/Chinthe.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/Chinthe.cs index e9f7c23c..37db9c52 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/Chinthe.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/Chinthe.cs @@ -28,7 +28,7 @@ public partial class Chinthe : Enemy, IHasPrimaryAttack, ICanPatrol, ICanActivat EnemyModelView.Hitbox.AreaEntered += Hitbox_AreaEntered; } - public new void OnPhysicsProcess(double delta) + public void OnPhysicsProcess(double delta) { _enemyLogic.Input(new EnemyLogic.Input.PhysicsTick(delta)); @@ -47,6 +47,12 @@ public partial class Chinthe : Enemy, IHasPrimaryAttack, ICanPatrol, ICanActivat base._PhysicsProcess(delta); } + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public override void TakeAction() { PrimaryAttack(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/Ambassador.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/Ambassador.cs index 10de94fa..cb6a55a6 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/Ambassador.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/Ambassador.cs @@ -57,6 +57,12 @@ public partial class Ambassador : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, options[(int)selection].Invoke(); } + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agi/AgiDemon.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agi/AgiDemon.cs index 194a6f15..d149194d 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agi/AgiDemon.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agi/AgiDemon.cs @@ -53,6 +53,13 @@ public partial class AgiDemon : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, I var selection = rng.RandWeighted([0.875f, 0.125f]); options[(int)selection].Invoke(); } + + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/Palan.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/Palan.cs index 5d56a4b4..ff6d3075 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/Palan.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/Palan.cs @@ -53,6 +53,13 @@ public partial class Palan : Enemy, IHasPrimaryAttack, IHasSecondaryAttack, ICan var selection = rng.RandWeighted([0.875f, 0.125f]); options[(int)selection].Invoke(); } + + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldOfHeaven.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldOfHeaven.cs index 5cc4fe7b..f4700d39 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldOfHeaven.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldOfHeaven.cs @@ -53,6 +53,13 @@ public partial class ShieldOfHeaven : Enemy, IHasPrimaryAttack, IHasSecondaryAtt var selection = rng.RandWeighted([0.875f, 0.125f]); options[(int)selection].Invoke(); } + + public override void Die() + { + _navigationAgentClient.Stop(); + base.Die(); + } + public void PrimaryAttack() { _enemyModelView.PlayPrimaryAttackAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.tscn index f2b5a81b..d8775645 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWall.tscn @@ -8,17 +8,17 @@ script = ExtResource("2_bpd8u") CurrentHP = 100.0 MaximumHP = 100 -CurrentAttack = 0 -CurrentDefense = 0 -MaxAttack = 0 -MaxDefense = 0 -ExpFromDefeat = 0 +CurrentAttack = null +CurrentDefense = null +MaxAttack = null +MaxDefense = null +ExpFromDefeat = null Luck = 0.05 -_telluricResistance = 0.0 -_aeolicResistance = 0.0 -_hydricResistance = 0.0 -_igneousResistance = 0.0 -_ferrumResistance = 0.0 +_telluricResistance = null +_aeolicResistance = null +_hydricResistance = null +_igneousResistance = null +_ferrumResistance = null DropsSoulGemChance = 0.0 metadata/_custom_type_script = "uid://dnkmr0eq1sij0" @@ -33,6 +33,7 @@ collision_layer = 2 collision_mask = 2 script = ExtResource("1_dqcrh") _enemyStatResource = SubResource("Resource_ccv8a") +_maximumWallMoveAmount = null [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.40558, 8.3319, 2.53654) diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWallModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWallModelView.tscn index 0db96b60..c880df71 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWallModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/16. demon wall/DemonWallModelView.tscn @@ -157,33 +157,57 @@ unique_name_in_owner = true [node name="Arm1" parent="LeftArms" instance=ExtResource("1_ell80")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalDamageBonus = null [node name="Arm2" parent="LeftArms" instance=ExtResource("2_kblru")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalType = null +PrimaryAttackElementalDamageBonus = null [node name="Arm3" parent="LeftArms" instance=ExtResource("3_nqxqr")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalType = null +PrimaryAttackElementalDamageBonus = null [node name="Arm4" parent="LeftArms" instance=ExtResource("4_r5yku")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalType = null +PrimaryAttackElementalDamageBonus = null [node name="Arm5" parent="LeftArms" instance=ExtResource("5_5oa7x")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalType = null +PrimaryAttackElementalDamageBonus = null [node name="RightArms" type="Node3D" parent="."] unique_name_in_owner = true [node name="Arm6" parent="RightArms" instance=ExtResource("6_h1yna")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalDamageBonus = null [node name="Arm7" parent="RightArms" instance=ExtResource("7_6s6sq")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalDamageBonus = null [node name="Arm8" parent="RightArms" instance=ExtResource("8_e82oe")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalType = null +PrimaryAttackElementalDamageBonus = null [node name="Arm9" parent="RightArms" instance=ExtResource("9_c826n")] unique_name_in_owner = true +Damage = null +PrimaryAttackElementalType = null +PrimaryAttackElementalDamageBonus = null [node name="Base" type="Node3D" parent="."] diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosDemon.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosDemon.tscn index 6e38103c..7989d2e1 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosDemon.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosDemon.tscn @@ -12,14 +12,14 @@ CurrentAttack = 10 CurrentDefense = 5 MaxAttack = 10 MaxDefense = 5 -ExpFromDefeat = 0 +ExpFromDefeat = null Luck = 0.05 -_telluricResistance = 0.0 -_aeolicResistance = 0.0 +_telluricResistance = null +_aeolicResistance = null _hydricResistance = 0.5 -_igneousResistance = 0.0 -_ferrumResistance = 0.0 -DropsSoulGemChance = 0.75 +_igneousResistance = null +_ferrumResistance = null +DropsSoulGemChance = null metadata/_custom_type_script = "uid://dnkmr0eq1sij0" [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cwfph"] @@ -41,8 +41,11 @@ axis_lock_linear_y = true axis_lock_angular_x = true script = ExtResource("1_wbopj") PrimaryAttackElementalType = 3 +PrimaryAttackElementalDamageBonus = null SecondaryAttackElementalType = 3 +SecondaryAttackElementalDamageBonus = null _enemyStatResource = SubResource("Resource_m7ocm") +_movementSpeed = null [node name="CollisionShape3D" type="CollisionShape3D" parent="."] transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0) diff --git a/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml b/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml index 256799bd..33157ae0 100644 --- a/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml +++ b/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml @@ -2,9 +2,9 @@ state "EnemyLogic State" as Zennysoft_Game_Ma_EnemyLogic_State { state "Alive" as Zennysoft_Game_Ma_EnemyLogic_State_Alive { state "Activated" as Zennysoft_Game_Ma_EnemyLogic_State_Activated { - state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling - state "FollowPlayer" as Zennysoft_Game_Ma_EnemyLogic_State_FollowPlayer state "Attacking" as Zennysoft_Game_Ma_EnemyLogic_State_Attacking + state "FollowPlayer" as Zennysoft_Game_Ma_EnemyLogic_State_FollowPlayer + state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling } state "Idle" as Zennysoft_Game_Ma_EnemyLogic_State_Idle } diff --git a/Zennysoft.Game.Ma/src/game/Game.cs b/Zennysoft.Game.Ma/src/game/Game.cs index c5e6465a..14ee9dd8 100644 --- a/Zennysoft.Game.Ma/src/game/Game.cs +++ b/Zennysoft.Game.Ma/src/game/Game.cs @@ -335,6 +335,22 @@ public partial class Game : Node3D, IGame return rolledItem; } + public override void _Input(InputEvent @event) + { + if (@event.IsActionPressed(GameInputs.Debug) && !InGameUI.DebugMenu.Visible) + { + InGameUI.DebugMenu.Show(); + InGameUI.PlayerInfoUI.Hide(); + GameRepo.Pause(); + } + else if (@event.IsActionPressed(GameInputs.Debug) && InGameUI.DebugMenu.Visible) + { + InGameUI.DebugMenu.Hide(); + InGameUI.PlayerInfoUI.Show(); + GameRepo.Resume(); + } + } + private void DropRestorative(Vector3 vector) { var restorativeScene = GD.Load("res://src/items/restorative/Restorative.tscn"); diff --git a/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.tscn b/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.tscn index 703873ad..4566739f 100644 --- a/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.tscn +++ b/Zennysoft.Game.Ma/src/inventory_menu/InventoryMenu.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=35 format=3 uid="uid://dlj8qdg1c5048"] -[ext_resource type="Script" path="res://src/inventory_menu/InventoryMenu.cs" id="1_l64wl"] -[ext_resource type="Shader" path="res://src/inventory_menu/InventoryMenu.gdshader" id="2_0fvsh"] +[ext_resource type="Script" uid="uid://cmtet15hi5oiy" path="res://src/inventory_menu/InventoryMenu.cs" id="1_l64wl"] +[ext_resource type="Shader" uid="uid://cnphwvmr05hp1" path="res://src/inventory_menu/InventoryMenu.gdshader" id="2_0fvsh"] [ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="3_lm4o1"] [ext_resource type="FontFile" uid="uid://cb41qqmxqurj8" path="res://src/ui/fonts/FT88-Bold.ttf" id="4_rg5yb"] [ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="5_2qnnx"] @@ -440,9 +440,9 @@ focus_neighbor_right = NodePath(".") focus_neighbor_bottom = NodePath("../ThrowButton") theme = ExtResource("8_khyvo") theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1) -theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1) -theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1) +theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) +theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1) theme_override_styles/focus = SubResource("StyleBoxEmpty_0kb6l") theme_override_styles/disabled = SubResource("StyleBoxEmpty_fu7o2") theme_override_styles/pressed = SubResource("StyleBoxEmpty_nkvce") @@ -464,9 +464,9 @@ focus_neighbor_right = NodePath(".") focus_neighbor_bottom = NodePath("../DropButton") theme = ExtResource("8_khyvo") theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1) -theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1) -theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1) +theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) +theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1) theme_override_styles/focus = SubResource("StyleBoxEmpty_0kb6l") theme_override_styles/disabled = SubResource("StyleBoxEmpty_ascpt") theme_override_styles/pressed = SubResource("StyleBoxEmpty_abpb1") @@ -488,9 +488,9 @@ focus_neighbor_right = NodePath(".") focus_neighbor_bottom = NodePath(".") theme = ExtResource("8_khyvo") theme_override_colors/font_disabled_color = Color(0.137255, 0.121569, 0.12549, 1) -theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1) -theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1) +theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) +theme_override_colors/font_pressed_color = Color(0.137255, 0.121569, 0.12549, 1) theme_override_styles/focus = SubResource("StyleBoxEmpty_omlgh") theme_override_styles/disabled = SubResource("StyleBoxEmpty_uerb4") theme_override_styles/pressed = SubResource("StyleBoxEmpty_lvcf8") diff --git a/Zennysoft.Game.Ma/src/items/armor/Armor.cs b/Zennysoft.Game.Ma/src/items/armor/Armor.cs index 9dc1b830..0e197a54 100644 --- a/Zennysoft.Game.Ma/src/items/armor/Armor.cs +++ b/Zennysoft.Game.Ma/src/items/armor/Armor.cs @@ -11,7 +11,12 @@ public partial class Armor : EquipableItem { public override void _Notification(int what) => this.Notify(what); - [Node] private Sprite3D Sprite { get; set; } = default!; + [Node] private Sprite3D _sprite { get; set; } = default!; + + public override void _Ready() + { + _sprite.Texture = Stats.Texture; + } public override string ItemName => Stats.Name; @@ -32,8 +37,8 @@ public partial class Armor : EquipableItem public override ItemTag ItemTag => Stats.ItemTag; - [Export] [Save("armor_stats")] + [Export] public ArmorStats Stats { get; set; } = new ArmorStats(); public override Texture2D GetTexture() => Stats.Texture; } diff --git a/Zennysoft.Game.Ma/src/items/armor/resources/Acceptance.tres b/Zennysoft.Game.Ma/src/items/armor/resources/Acceptance.tres index 514b3e7e..59ba7b8d 100644 --- a/Zennysoft.Game.Ma/src/items/armor/resources/Acceptance.tres +++ b/Zennysoft.Game.Ma/src/items/armor/resources/Acceptance.tres @@ -1,17 +1,24 @@ [gd_resource type="Resource" script_class="ArmorStats" load_steps=3 format=3 uid="uid://b8mjje06x6dl1"] [ext_resource type="Texture2D" uid="uid://dbb3x4cbo8jc1" path="res://src/items/armor/textures/ACCEPTANCE.PNG" id="1_p85jd"] -[ext_resource type="Script" path="res://src/items/armor/ArmorStats.cs" id="1_si4wu"] +[ext_resource type="Script" uid="uid://dqtp6ewvttoyu" path="res://src/items/armor/ArmorStats.cs" id="1_si4wu"] [resource] script = ExtResource("1_si4wu") -Defense = 9 -TelluricResistance = 0.0 -AeolicResistance = 0.0 -HydricResistance = 0.0 -IgneousResistance = 0.0 -FerrumResistance = 0.0 Name = "Acceptance" Description = "+9 DEF" -Texture = ExtResource("1_p85jd") +Defense = 9 +_telluricResistance = 0.0 +_aeolicResistance = 0.0 +_hydricResistance = 0.0 +_igneousResistance = 0.0 +_ferrumResistance = 0.0 +Name = "Acceptance" +Description = "+9 DEF" SpawnRate = 0.01 +ThrowSpeed = 12.0 +HealHPAmount = 0 +HealVTAmount = 0 +ThrowDamage = 5 +ItemTag = 0 +Texture = ExtResource("1_p85jd") diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/Atonement.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/Atonement.tres index 809b442f..d832f6d3 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/Atonement.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/Atonement.tres @@ -1,4 +1,4 @@ -[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://ww4vha51i82v"] +[gd_resource type="Resource" load_steps=2 format=3 uid="uid://ww4vha51i82v"] [ext_resource type="Script" uid="uid://cc7byqeolw5y4" path="res://src/items/weapons/WeaponStats.cs" id="1_d2lw0"] @@ -21,17 +21,6 @@ AttackSpeed = 0.15 WeaponElement = 0 ElementalDamageBonus = 1.0 WeaponTag = 0 -Name = "Atonement" -Description = "\"Should I betray my mother, my father, my brother, my sister, my love, let me be pierced by a thousand knives. -Should I betray the self, let me be struck by 10,000 lightning bolts. -Should I betray them both, let me wander the earth until the pillars of heaven turn to dust.\" - -When the 2nd world reached the end of it's creation, -The Goddess of Destruction materialized it's sorrow into this form. - -A powerful weapon that has the ability to obliterate anything of the earth. - -There is significance in your using it." SpawnRate = 0.0 ThrowSpeed = 12.0 HealHPAmount = 0 diff --git a/Zennysoft.Game.Ma/src/items/weapons/resources/MysteryRod.tres b/Zennysoft.Game.Ma/src/items/weapons/resources/MysteryRod.tres index 7ee2ab18..2f01ccf3 100644 --- a/Zennysoft.Game.Ma/src/items/weapons/resources/MysteryRod.tres +++ b/Zennysoft.Game.Ma/src/items/weapons/resources/MysteryRod.tres @@ -5,7 +5,7 @@ [resource] script = ExtResource("1_iran7") -Name = "Mystery rod" +Name = "Mystery Rod" Description = "Unidentified rod." Damage = 0 Luck = 0.05 @@ -13,7 +13,7 @@ AttackSpeed = 1.0 WeaponElement = 0 ElementalDamageBonus = 1.0 WeaponTag = 0 -Name = "Mystery rod" +Name = "Mystery Rod" Description = "Unidentified rod." SpawnRate = 0.5 ThrowSpeed = 12.0 diff --git a/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs b/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs index 01701865..d524f99d 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs +++ b/Zennysoft.Game.Ma/src/map/dungeon/code/MonsterRoom.cs @@ -37,7 +37,7 @@ public partial class MonsterRoom : DungeonRoom var enemy = enemyDatabase.EnemyList[rng.RandWeighted(enemyDatabase.SpawnRate)]; var instantiatedEnemy = enemy.Instantiate(); - instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, -0.5f, spawnPoint.Position.Z); + instantiatedEnemy.Position = new Vector3(spawnPoint.Position.X, 0, spawnPoint.Position.Z); AddChild(instantiatedEnemy); } } diff --git a/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor01.tscn b/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor01.tscn index d5262425..7379adc0 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor01.tscn +++ b/Zennysoft.Game.Ma/src/map/dungeon/floors/Floor01.tscn @@ -1,13 +1,11 @@ -[gd_scene load_steps=15 format=3 uid="uid://bc1sp6xwe0j65"] +[gd_scene load_steps=13 format=3 uid="uid://bc1sp6xwe0j65"] [ext_resource type="Script" uid="uid://dwt6302nsf4vq" path="res://src/map/dungeon/code/DungeonFloor.cs" id="1_0ecnn"] [ext_resource type="Script" uid="uid://b1x125h0tya2w" path="res://addons/SimpleDungeons/DungeonGenerator3D.gd" id="2_cxmwa"] [ext_resource type="PackedScene" uid="uid://dpec2lbt83dhe" path="res://src/map/dungeon/rooms/Set A/03. Antechamber A.tscn" id="3_gkkr3"] [ext_resource type="PackedScene" uid="uid://dn5546yqyntfr" path="res://src/map/dungeon/rooms/Set A/10. Item Transfer Room.tscn" id="6_atq1f"] -[ext_resource type="Script" uid="uid://ce73fuh74l81l" path="res://addons/SimpleDungeons/DungeonRoom3D.gd" id="8_1l8yt"] [ext_resource type="PackedScene" uid="uid://b82dx66mgs2d7" path="res://src/map/dungeon/rooms/Set A/08. Basin Room.tscn" id="8_5rblf"] [ext_resource type="PackedScene" uid="uid://bs56ccgosmu47" path="res://src/enemy/enemy_types/01. sproingy/Sproingy.tscn" id="9_atq1f"] -[ext_resource type="Script" uid="uid://fk3jis6rsipv" path="res://src/map/dungeon/code/corridor.gd" id="9_lcc45"] [ext_resource type="PackedScene" uid="uid://dbvr8ewajja6a" path="res://src/enemy/EnemyDatabase.tscn" id="12_aw26s"] [ext_resource type="PackedScene" uid="uid://cihbmyo0ltq4m" path="res://src/map/dungeon/rooms/Set A/19. Floor Exit A.tscn" id="12_n02rw"] [ext_resource type="PackedScene" uid="uid://bn4gslp2gk8ds" path="res://src/map/dungeon/rooms/Set A/18. Corridor A.tscn" id="13_ofywd"] @@ -47,167 +45,95 @@ corridor_cost_multiplier = 0.1 show_debug_in_editor = false hide_debug_visuals_for_all_generated_rooms = false -[node name="Item Transfer Room_0" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("6_atq1f")] +[node name="Item Transfer Room_0" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("6_atq1f")] transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 22, 0, 20) -script = ExtResource("8_1l8yt") -size_in_voxels = Vector3i(3, 1, 4) -voxel_scale = Vector3(4, 4, 4) -min_count = 1 -max_count = 1 -[node name="BasinRoom_1" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("8_5rblf")] +[node name="BasinRoom_1" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("8_5rblf")] transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 4, 0, 14) -script = ExtResource("8_1l8yt") -size_in_voxels = Vector3i(5, 1, 4) -voxel_scale = Vector3(4, 4, 4) -min_count = 1 -max_count = 2 -[node name="Antechamber A_2" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("3_gkkr3")] +[node name="Antechamber A_2" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("3_gkkr3")] transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -22, 0, 20) -script = ExtResource("8_1l8yt") -size_in_voxels = Vector3i(5, 1, 4) -voxel_scale = Vector3(4, 4, 4) -min_count = 1 -max_count = 2 -[node name="Floor Exit A_3" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("12_n02rw")] +[node name="Floor Exit A_3" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("12_n02rw")] transform = Transform3D(1.19249e-08, 0, -1, 0, 1, 0, 1, 0, 1.19249e-08, 14, 0, -6) -script = ExtResource("8_1l8yt") -size_in_voxels = Vector3i(5, 1, 9) -voxel_scale = Vector3(4, 4, 4) -min_count = 1 -max_count = 1 -[node name="Corridor_4" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_4" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 22, 0, 30) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_5" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_5" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 0, 30) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_6" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_6" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 30) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_7" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_7" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_8" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_8" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 22) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_9" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_9" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 18) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_10" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_10" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 0, 14) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_11" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_11" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_12" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_12" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 6, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_13" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_13" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_14" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_14" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_15" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_15" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_16" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_16" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 26) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_17" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_17" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 22) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_18" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_18" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 18) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_19" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_19" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 14) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_20" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_20" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, 10) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_21" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_21" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, 10) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_22" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_22" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 10) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_23" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_23" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 6) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_24" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_24" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, 2) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_25" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_25" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -18, 0, -2) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_26" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_26" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14, 0, -2) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_27" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_27" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -2) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_28" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_28" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -10, 0, -6) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) -[node name="Corridor_29" type="Node3D" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] +[node name="Corridor_29" parent="NavigationRegion3D/DungeonGenerator" instance=ExtResource("13_ofywd")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -6, 0, -6) -script = ExtResource("9_lcc45") -voxel_scale = Vector3(4, 4, 4) [node name="RoomsContainer" type="Node3D" parent="NavigationRegion3D/DungeonGenerator"] diff --git a/Zennysoft.Game.Ma/src/menu/DebugMenu.tscn b/Zennysoft.Game.Ma/src/menu/DebugMenu.tscn new file mode 100644 index 00000000..b43d9936 --- /dev/null +++ b/Zennysoft.Game.Ma/src/menu/DebugMenu.tscn @@ -0,0 +1,84 @@ +[gd_scene load_steps=8 format=3 uid="uid://8f3dk16nj0dn"] + +[ext_resource type="Script" uid="uid://l1v4ppubryd3" path="res://src/ui/pause_menu/PauseDebugMenu.cs" id="1_a7f7f"] +[ext_resource type="FontFile" uid="uid://dp1k143v7cppw" path="res://src/ui/fonts/Lust_Sans_Regular.otf" id="1_dan2i"] +[ext_resource type="LabelSettings" uid="uid://wc363u5t1yi2" path="res://src/ui/label_settings/HeadingFont.tres" id="2_a7f7f"] +[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="3_k06jx"] + +[sub_resource type="Theme" id="Theme_0tcdw"] +default_font = ExtResource("3_k06jx") +default_font_size = 40 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_18bov"] +bg_color = Color(0.2484, 0.2484, 0.2484, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1ctjd"] + +[node name="Control" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_a7f7f") + +[node name="MarginContainer" type="MarginContainer" parent="."] +process_mode = 3 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 25 +theme_override_constants/margin_top = 25 +theme_override_constants/margin_bottom = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +process_mode = 3 +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = ExtResource("1_dan2i") +theme_override_font_sizes/font_size = 72 +text = "Debug Menu" +label_settings = ExtResource("2_a7f7f") +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="VFlowContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = 15 + +[node name="LoadNextFloorButton" type="Button" parent="MarginContainer/VBoxContainer/HBoxContainer/VFlowContainer"] +unique_name_in_owner = true +process_mode = 3 +custom_minimum_size = Vector2(500, 100) +layout_mode = 2 +focus_neighbor_top = NodePath(".") +focus_neighbor_bottom = NodePath("../SpawnItemDropDown") +theme = SubResource("Theme_0tcdw") +theme_override_colors/font_color = Color(0.916332, 0.589636, 0.0275597, 1) +theme_override_colors/font_focus_color = Color(0, 0, 1, 1) +theme_override_colors/font_pressed_color = Color(0, 0, 0, 1) +theme_override_constants/outline_size = 2 +theme_override_styles/normal = SubResource("StyleBoxFlat_18bov") +button_mask = 0 +text = "Load Next Floor" + +[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer/VFlowContainer"] +layout_mode = 2 +text = "Spawn Item:" +label_settings = ExtResource("2_a7f7f") + +[node name="SpawnItemDropDown" type="OptionButton" parent="MarginContainer/VBoxContainer/HBoxContainer/VFlowContainer"] +unique_name_in_owner = true +layout_mode = 2 +focus_neighbor_top = NodePath("../LoadNextFloorButton") +focus_neighbor_bottom = NodePath(".") +theme_override_styles/normal = SubResource("StyleBoxFlat_1ctjd") diff --git a/Zennysoft.Game.Ma/src/player/Player.tscn b/Zennysoft.Game.Ma/src/player/Player.tscn index 94d27ccd..9c409eb1 100644 --- a/Zennysoft.Game.Ma/src/player/Player.tscn +++ b/Zennysoft.Game.Ma/src/player/Player.tscn @@ -33,8 +33,8 @@ MaxDefense = 1 Luck = 0.05 [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_dw45s"] -radius = 1.02589 -height = 2.83556 +radius = 1.0 +height = 3.07596 [sub_resource type="Animation" id="Animation_hcjph"] length = 0.001 @@ -495,7 +495,7 @@ _defaultWeapon = ExtResource("3_es4xk") _defaultArmor = ExtResource("4_bj1ma") [node name="PlayerGeometryCollision" type="CollisionShape3D" parent="."] -transform = Transform3D(-0.0242402, 0, 0.999706, 0, 1, 0, -0.999706, 0, -0.0242402, 0, 1.06447, 0.367568) +transform = Transform3D(-0.0242402, 0, 0.999706, 0, 1, 0, -0.999706, 0, -0.0242402, 0, 1.06447, -0.153069) shape = SubResource("CapsuleShape3D_dw45s") [node name="HealthTimer" type="Timer" parent="."] diff --git a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs index 1e3be0e7..4487ce23 100644 --- a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs +++ b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.cs @@ -24,6 +24,8 @@ public partial class InGameUI : Control, IInGameUI [Node] public IUseTeleportPrompt UseTeleportPrompt { get; set; } = default!; + [Node] public IDebugMenu DebugMenu { get; set; } = default!; + [Dependency] private IGameRepo _gameRepo => this.DependOn(); public IInGameUILogic InGameUILogic { get; set; } = default!; diff --git a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.tscn b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.tscn index 00cca250..0c70a096 100644 --- a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.tscn +++ b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=3 uid="uid://b1muxus5qdbeu"] +[gd_scene load_steps=8 format=3 uid="uid://b1muxus5qdbeu"] [ext_resource type="Script" uid="uid://dlq2mkhl4pe7a" path="res://src/ui/in_game_ui/InGameUI.cs" id="1_sc13i"] [ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="2_6sfje"] @@ -6,6 +6,7 @@ [ext_resource type="PackedScene" uid="uid://dxl8il8f13c2x" path="res://src/ui/player_ui/PlayerInfoUI.tscn" id="4_46s5l"] [ext_resource type="PackedScene" uid="uid://bea2waybmgd6u" path="res://src/ui/teleport_prompt/UseTeleportPrompt.tscn" id="5_h1hgq"] [ext_resource type="Script" uid="uid://dj6oqler47dqf" path="res://src/utils/FpsCounter.cs" id="7_c6o8j"] +[ext_resource type="PackedScene" uid="uid://8f3dk16nj0dn" path="res://src/menu/DebugMenu.tscn" id="7_llomk"] [node name="InGameUI" type="Control"] process_mode = 3 @@ -48,3 +49,8 @@ anchor_bottom = 0.021 offset_right = -0.320004 offset_bottom = 0.319998 script = ExtResource("7_c6o8j") + +[node name="DebugMenu" parent="." instance=ExtResource("7_llomk")] +unique_name_in_owner = true +visible = false +layout_mode = 1 diff --git a/Zennysoft.Game.Ma/src/ui/pause_menu/DebugMenu.cs.uid b/Zennysoft.Game.Ma/src/ui/pause_menu/DebugMenu.cs.uid new file mode 100644 index 00000000..ec92f080 --- /dev/null +++ b/Zennysoft.Game.Ma/src/ui/pause_menu/DebugMenu.cs.uid @@ -0,0 +1 @@ +uid://0jfd7fcxyuq1 diff --git a/Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs b/Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs new file mode 100644 index 00000000..429d3b7b --- /dev/null +++ b/Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs @@ -0,0 +1,5 @@ +using Chickensoft.GodotNodeInterfaces; + +namespace Zennysoft.Game.Ma; + +public interface IDebugMenu : IControl; diff --git a/Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs.uid b/Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs.uid new file mode 100644 index 00000000..5af2ae5c --- /dev/null +++ b/Zennysoft.Game.Ma/src/ui/pause_menu/IDebugMenu.cs.uid @@ -0,0 +1 @@ +uid://dkibl33wtc58k diff --git a/Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs b/Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs new file mode 100644 index 00000000..50c064d5 --- /dev/null +++ b/Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs @@ -0,0 +1,58 @@ +using Chickensoft.AutoInject; +using Chickensoft.Introspection; +using Godot; +using System.Collections.Immutable; +using System.Linq; +using Zennysoft.Ma.Adapter; + +namespace Zennysoft.Game.Ma; + +[Meta(typeof(IAutoNode))] +public partial class PauseDebugMenu : Control, IDebugMenu +{ + public override void _Notification(int what) => this.Notify(what); + + [Dependency] private IMap _map => this.DependOn(() => new Map()); + + [Dependency] private IPlayer _player => this.DependOn(); + + [Node] public Button LoadNextFloorButton { get; set; } = default!; + + [Node] public OptionButton SpawnItemDropDown { get; set; } = default; + + private ImmutableList SpawnableItems; + + private ItemDatabase _itemDatabase; + + public override void _Ready() + { + VisibilityChanged += PauseDebugMenu_VisibilityChanged; + LoadNextFloorButton.Pressed += LoadNextFloorButton_Pressed; + _itemDatabase = new ItemDatabase(); + SpawnableItems = _itemDatabase.Items; + foreach (var item in SpawnableItems) + SpawnItemDropDown.AddItem(item.ItemName, SpawnableItems.IndexOf(item)); + SpawnItemDropDown.ItemSelected += SpawnItemDropDown_ItemSelected; + } + + private void SpawnItemDropDown_ItemSelected(long index) + { + var itemToSpawn = SpawnableItems.ElementAt((int)index); + var duplicated = itemToSpawn.Duplicate((int)DuplicateFlags.UseInstantiation) as Node3D; + duplicated.GlobalPosition = new Vector3(_player.CurrentPosition.X, _player.CurrentPosition.Y + 1, _player.CurrentPosition.Z) + (-_player.CurrentBasis.Z * 2); + AddChild(duplicated); + } + + private void LoadNextFloorButton_Pressed() + { + _map.SpawnNextFloor(); + } + + private void PauseDebugMenu_VisibilityChanged() + { + if (Visible) + LoadNextFloorButton.GrabFocus(); + else + ReleaseFocus(); + } +} \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs.uid b/Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs.uid new file mode 100644 index 00000000..84a3cf48 --- /dev/null +++ b/Zennysoft.Game.Ma/src/ui/pause_menu/PauseDebugMenu.cs.uid @@ -0,0 +1 @@ +uid://l1v4ppubryd3 diff --git a/Zennysoft.Game.Ma/src/ui/pause_menu/PauseMenu.tscn b/Zennysoft.Game.Ma/src/ui/pause_menu/PauseMenu.tscn index 75520633..9e4cc691 100644 --- a/Zennysoft.Game.Ma/src/ui/pause_menu/PauseMenu.tscn +++ b/Zennysoft.Game.Ma/src/ui/pause_menu/PauseMenu.tscn @@ -1,8 +1,7 @@ [gd_scene load_steps=5 format=3 uid="uid://blbqgw3wosc1w"] -[sub_resource type="Animation" id="Animation_ccrq3"] -resource_name = "fade_out" -length = 0.5 +[sub_resource type="Animation" id="Animation_f1eqn"] +length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -10,10 +9,10 @@ tracks/0/path = NodePath(".:modulate") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0, 0.3), -"transitions": PackedFloat32Array(1, 7.7), +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), "update": 0, -"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] +"values": [Color(1, 1, 1, 1)] } [sub_resource type="Animation" id="Animation_bium7"] @@ -32,8 +31,9 @@ tracks/0/keys = { "values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)] } -[sub_resource type="Animation" id="Animation_f1eqn"] -length = 0.001 +[sub_resource type="Animation" id="Animation_ccrq3"] +resource_name = "fade_out" +length = 0.5 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -41,17 +41,17 @@ tracks/0/path = NodePath(".:modulate") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), +"times": PackedFloat32Array(0, 0.3), +"transitions": PackedFloat32Array(1, 7.7), "update": 0, -"values": [Color(1, 1, 1, 1)] +"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)] } [sub_resource type="AnimationLibrary" id="AnimationLibrary_pmp7u"] _data = { -"RESET": SubResource("Animation_f1eqn"), -"fade_in": SubResource("Animation_bium7"), -"fade_out": SubResource("Animation_ccrq3") +&"RESET": SubResource("Animation_f1eqn"), +&"fade_in": SubResource("Animation_bium7"), +&"fade_out": SubResource("Animation_ccrq3") } [node name="PauseMenu" type="Control"] @@ -66,7 +66,7 @@ grow_vertical = 2 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] unique_name_in_owner = true libraries = { -"": SubResource("AnimationLibrary_pmp7u") +&"": SubResource("AnimationLibrary_pmp7u") } [node name="ColorRect" type="ColorRect" parent="."]