diff --git a/Zennysoft.Game.Abstractions/App/IAppRepo.cs b/Zennysoft.Game.Abstractions/App/IAppRepo.cs index e2309e2d..54f9c16c 100644 --- a/Zennysoft.Game.Abstractions/App/IAppRepo.cs +++ b/Zennysoft.Game.Abstractions/App/IAppRepo.cs @@ -10,6 +10,8 @@ public interface IAppRepo : IDisposable event Action? MainMenuEntered; + event Action? DataViewerExited; + void SkipSplashScreen(); void OnMainMenuEntered(); @@ -19,4 +21,6 @@ public interface IAppRepo : IDisposable void OnExitGame(); void OnGameOver(); + + void OnDataViewerExited(); } diff --git a/Zennysoft.Game.Ma.Implementation/App/AppRepo.cs b/Zennysoft.Game.Ma.Implementation/App/AppRepo.cs index 06cd7690..fd08bda0 100644 --- a/Zennysoft.Game.Ma.Implementation/App/AppRepo.cs +++ b/Zennysoft.Game.Ma.Implementation/App/AppRepo.cs @@ -8,6 +8,7 @@ public class AppRepo : IAppRepo public event Action? MainMenuEntered; public event Action? GameEntered; public event Action? GameExited; + public event Action? DataViewerExited; private bool _disposedValue; @@ -21,6 +22,8 @@ public class AppRepo : IAppRepo public void OnGameOver() => GameExited?.Invoke(); + public void OnDataViewerExited() => DataViewerExited?.Invoke(); + protected void Dispose(bool disposing) { if (!_disposedValue) diff --git a/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Input.cs b/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Input.cs index 202dbcfe..16a40ec5 100644 --- a/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Input.cs +++ b/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Input.cs @@ -24,6 +24,8 @@ public partial class AppLogic public readonly record struct EnemyViewerOpened; + public readonly record struct EnemyViewerExited; + public readonly record struct GalleryOpened; } } diff --git a/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Output.cs b/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Output.cs index f15f76af..bbfcfb48 100644 --- a/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Output.cs +++ b/Zennysoft.Game.Ma.Implementation/App/State/AppLogic.Output.cs @@ -32,6 +32,8 @@ public partial class AppLogic public readonly record struct EnemyViewerOpened; + public readonly record struct EnemyViewerExited; + public readonly record struct GalleryOpened; } } diff --git a/Zennysoft.Game.Ma.Implementation/App/State/States/AppLogic.State.EnemyViewer.cs b/Zennysoft.Game.Ma.Implementation/App/State/States/AppLogic.State.EnemyViewer.cs index f66b75a2..bae79448 100644 --- a/Zennysoft.Game.Ma.Implementation/App/State/States/AppLogic.State.EnemyViewer.cs +++ b/Zennysoft.Game.Ma.Implementation/App/State/States/AppLogic.State.EnemyViewer.cs @@ -9,7 +9,7 @@ public partial class AppLogic public partial record State { [Meta] - public partial record EnemyViewer : State + public partial record EnemyViewer : State, IGet { public EnemyViewer() { @@ -18,7 +18,13 @@ public partial class AppLogic { Output(new Output.EnemyViewerOpened()); }); + this.OnExit(() => + { + Output(new Output.EnemyViewerExited()); + }); } + + public Transition On(in Input.EnemyViewerExited input) => To(); } } } diff --git a/Zennysoft.Game.Ma/Ma.csproj b/Zennysoft.Game.Ma/Ma.csproj index 0ca2470c..853d610d 100644 --- a/Zennysoft.Game.Ma/Ma.csproj +++ b/Zennysoft.Game.Ma/Ma.csproj @@ -1,4 +1,4 @@ - + net8.0 true diff --git a/Zennysoft.Game.Ma/Ma.csproj.old.5 b/Zennysoft.Game.Ma/Ma.csproj.old.5 index 853d610d..0ca2470c 100644 --- a/Zennysoft.Game.Ma/Ma.csproj.old.5 +++ b/Zennysoft.Game.Ma/Ma.csproj.old.5 @@ -1,4 +1,4 @@ - + net8.0 true diff --git a/Zennysoft.Game.Ma/project.godot b/Zennysoft.Game.Ma/project.godot index 686eb4ad..2c153926 100644 --- a/Zennysoft.Game.Ma/project.godot +++ b/Zennysoft.Game.Ma/project.godot @@ -123,24 +123,28 @@ MoveUp={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":11,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) ] } MoveLeft={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) ] } MoveRight={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) ] } MoveDown={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) ] } Attack={ @@ -224,6 +228,26 @@ AltAttack={ "events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"canceled":false,"pressed":false,"double_click":false,"script":null) ] } +CameraForward={ +"deadzone": 0.2, +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":-1.0,"script":null) +] +} +CameraBack={ +"deadzone": 0.2, +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":3,"axis_value":1.0,"script":null) +] +} +EnemyViewerIdle={ +"deadzone": 0.2, +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":4,"axis_value":1.0,"script":null) +] +} +EnemyViewerWalk={ +"deadzone": 0.2, +"events": [Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":5,"axis_value":1.0,"script":null) +] +} [internationalization] diff --git a/Zennysoft.Game.Ma/src/Main.cs b/Zennysoft.Game.Ma/src/Main.cs index e1407fa9..21c426b6 100644 --- a/Zennysoft.Game.Ma/src/Main.cs +++ b/Zennysoft.Game.Ma/src/Main.cs @@ -2,18 +2,13 @@ namespace Zennysoft.Game.Ma; using Godot; -#if DEBUG -using System.Reflection; -#endif - public partial class Main : Node { public override void _Ready() { - // If we don't need to run tests, we can just switch to the game scene. - CallDeferred("RunScene"); + CallDeferred("RunScene"); } private void RunScene() - => GetTree().ChangeSceneToFile("res://src/app/App.tscn"); + => GetTree().ChangeSceneToFile("res://src/app/App.tscn"); } diff --git a/Zennysoft.Game.Ma/src/app/App.cs b/Zennysoft.Game.Ma/src/app/App.cs index 5782dd06..54519c46 100644 --- a/Zennysoft.Game.Ma/src/app/App.cs +++ b/Zennysoft.Game.Ma/src/app/App.cs @@ -6,12 +6,15 @@ using Godot; using Godot.Collections; using NathanHoad; using SimpleInjector.Lifestyles; +using System; using System.IO.Abstractions; using System.Linq; using System.Threading.Tasks; using Zennysoft.Game.Abstractions; using Zennysoft.Game.Implementation; using Zennysoft.Ma.Adapter; +using static Zennysoft.Game.Ma.SceneLoader; +using static Zennysoft.Ma.Adapter.AppLogic.State; namespace Zennysoft.Game.Ma; @@ -42,15 +45,22 @@ public partial class App : Node, IApp public IAppLogic AppLogic { get; set; } = default!; public AppLogic.IBinding AppBinding { get; set; } = default!; - private Array _progress; + private Godot.Collections.Array _progress; private SimpleInjector.Container _container; - private AutoProp _loadedScene = new(string.Empty); + private DataViewer _dataViewer; private bool _loadingGame = false; private bool _loadingEnemyViewer = false; private string _optionsSavePath = string.Empty; private string _controllerSavePath = string.Empty; private ISaveFileManager _saveFileManager; + private IGame _game; + private IDataViewer _enemyViewer; + + private event Action OnGameLoaded; + private event Action OnEnemyViewerLoaded; + + private double _reportedProgress = 0; public void Initialize() { @@ -82,7 +92,6 @@ public partial class App : Node, IApp MainMenu.Gallery += OnGallery; MainMenu.Options += OnOptions; MainMenu.Quit += OnQuit; - _loadedScene.Changed += OnGameLoaded; GalleryMenu.GalleryExited += GalleryExited; @@ -94,6 +103,8 @@ public partial class App : Node, IApp AppLogic.Set(AppRepo); AppLogic.Set(new AppLogic.Data()); + AppRepo.DataViewerExited += DataViewerExited; + Input.MouseMode = Input.MouseModeEnum.Visible; _progress = []; this.Provide(); @@ -105,6 +116,11 @@ public partial class App : Node, IApp saveFileManager.DeleteSaveData(); } + private void DataViewerExited() + { + AppLogic.Input(new AppLogic.Input.EnemyViewerExited()); + } + private async void OptionsMenu_OptionsMenuExited() { var saveFileManager = _container.GetInstance(); @@ -121,14 +137,6 @@ public partial class App : Node, IApp MainMenu.GalleryButton.GrabFocus(); } - private void OnGameLoaded(string sceneName) - { - LoadingScreen.Hide(); - var scene = (PackedScene)ResourceLoader.LoadThreadedGet(sceneName); - var node = scene.Instantiate(); - AddChild(node); - } - public void OnReady() { AppBinding = AppLogic.Bind(); @@ -142,8 +150,7 @@ public partial class App : Node, IApp }) .Handle((in AppLogic.Output.SetupGameScene _) => { - ResourceLoader.LoadThreadedRequest(GAME_SCENE_PATH); - _loadingGame = true; + LoadGame(GAME_SCENE_PATH); MainMenu.ReleaseFocus(); MainMenu.Hide(); }) @@ -158,10 +165,17 @@ public partial class App : Node, IApp }) .Handle((in AppLogic.Output.EnemyViewerOpened _) => { - ResourceLoader.LoadThreadedRequest(ENEMY_VIEWER_PATH); - _loadingEnemyViewer = true; + LoadEnemyViewer(ENEMY_VIEWER_PATH); + MainMenu.ReleaseFocus(); MainMenu.Hide(); }) + .Handle((in AppLogic.Output.EnemyViewerExited _) => + { + if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer) + enemyViewer.CallDeferred(MethodName.QueueFree); + MainMenu.Show(); + MainMenu.EnemyViewerButton.GrabFocus(); + }) .Handle((in AppLogic.Output.ExitGame _) => { GetTree().Quit(); @@ -172,21 +186,10 @@ public partial class App : Node, IApp public override void _Process(double delta) { - if (_loadingGame) - { - ResourceLoader.LoadThreadedGetStatus(GAME_SCENE_PATH, _progress); - LoadingScreen.ProgressBar.Value = (double)_progress.Single(); - if ((double)_progress.Single() == 1) - _loadedScene.OnNext(GAME_SCENE_PATH); - } - - if (_loadingEnemyViewer) - { - ResourceLoader.LoadThreadedGetStatus(ENEMY_VIEWER_PATH, _progress); - LoadingScreen.ProgressBar.Value = (double)_progress.Single(); - if ((double)_progress.Single() == 1) - _loadedScene.OnNext(ENEMY_VIEWER_PATH); - } + if (_reportedProgress < 1) + LoadingScreen.ProgressBar.Value = Mathf.RoundToInt(Mathf.Lerp(LoadingScreen.ProgressBar.Value, _reportedProgress * 100, (float)delta * 2)); + else + LoadingScreen.ProgressBar.Value = Mathf.RoundToInt(Mathf.Lerp(LoadingScreen.ProgressBar.Value, 200, (float)delta * 5)); } public void OnStartGame() => AppLogic.Input(new AppLogic.Input.NewGame()); @@ -195,6 +198,37 @@ public partial class App : Node, IApp private void OnGalleryViewer() => AppLogic.Input(new AppLogic.Input.GalleryOpened()); + private async void LoadGame(string sceneName) + { + var scene = await LoadSceneInternal(sceneName); + _game = scene as IGame; + await ToSignal(GetTree().CreateTimer(0.8f), "timeout"); + CallDeferred(MethodName.AddChild, scene); + } + + private async void LoadEnemyViewer(string sceneName) + { + var scene = await LoadSceneInternal(sceneName); + _enemyViewer = scene as IDataViewer; + await ToSignal(GetTree().CreateTimer(0.8f), "timeout"); + CallDeferred(MethodName.AddChild, scene); + } + + private async Task LoadSceneInternal(string sceneName) + { + LoadingScreen.ProgressBar.Value = 0; + var sceneLoader = new SceneLoader(); + CallDeferred(MethodName.AddChild, sceneLoader); + sceneLoader.LoadSceneRequest(sceneName); + sceneLoader.SceneReportedProgress += SceneLoader_SceneReportedProgress; + await ToSignal(sceneLoader, SceneLoader.SignalName.SceneLoaded); + var result = sceneLoader.LoadedScene; + sceneLoader.QueueFree(); + return result; + } + + private void SceneLoader_SceneReportedProgress(double progress) => _reportedProgress = progress; + private async void OnOptions() { OptionsMenu.Show(); @@ -223,6 +257,5 @@ public partial class App : Node, IApp MainMenu.StartGame -= OnStartGame; MainMenu.EnemyViewer -= OnEnemyViewer; MainMenu.Quit -= OnQuit; - _loadedScene.Changed -= OnGameLoaded; } } diff --git a/Zennysoft.Game.Ma/src/app/App.gdshader b/Zennysoft.Game.Ma/src/app/App.gdshader index 40ebec18..05edcd36 100644 --- a/Zennysoft.Game.Ma/src/app/App.gdshader +++ b/Zennysoft.Game.Ma/src/app/App.gdshader @@ -25,18 +25,18 @@ vec2 wave(vec2 uv, float time) { void fragment() { vec2 center_position = -1.0 + 2.0 * UV / (1.0 / TEXTURE_PIXEL_SIZE); float center_distance = length(center_position); - + float ripple = sin(center_distance * -frequency * PI + ripple_rate * TIME) * amplitude / (center_distance + 1.0); - + vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy + (center_position/center_distance) * ripple * wave_amplitude; vec2 background_wave = wave(uv, TIME); vec4 background_texture = texture(SCREEN_TEXTURE,background_wave) * sqrt(amplitude); - float alpha_scalar = (1.0 - min(center_distance, 1.0)) * background_texture.x * 2.5; - + float alpha_scalar = (1.0 - min(center_distance, 1.0)) * background_texture.x * 2.5; + background_texture.a *= 1.0 * alpha_scalar * (ripple + background_texture.x * background_texture.y); background_texture.a = max(background_texture.a - (background_texture.y * 0.45), 0.0); - + COLOR = vec4(background_texture.xyz, background_texture.a); } \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/data_viewer/BlurSprite3D.gdshader b/Zennysoft.Game.Ma/src/data_viewer/BlurSprite3D.gdshader new file mode 100644 index 00000000..df450488 --- /dev/null +++ b/Zennysoft.Game.Ma/src/data_viewer/BlurSprite3D.gdshader @@ -0,0 +1,47 @@ +shader_type spatial; +render_mode diffuse_toon,specular_toon,cull_disabled; +uniform sampler2D iChannel0 : source_color; +uniform int samples =100; +// +// +uniform float alpha_cut ; +uniform float gain = 1.0; // gain : (gain), min = 0., max = 50. +// +uniform float blur_x =50.0; // X blur : (X blur), min = 0, max = 1000. +uniform float blur_y = 50.0; // Y blur : (Y blur), min = 0, max = 1000. +uniform float Rot_Angle : hint_range(0.0, 100.0, 0.1); +uniform float Metal : hint_range(0.0, 1.0, 0.1); +// +// +// +vec2 rotate(vec2 uv, vec2 p, float angle) +{ + mat2 rotation = mat2(vec2(cos(angle), -sin(angle)),vec2(sin(angle), cos(angle))); + uv -= p; + uv = uv * rotation; + uv += p; + return uv; +} + +void fragment(){ + float Angle = Rot_Angle/-100.0; + vec2 uv = UV; + vec2 origin; + float precompute = Angle * (1.0 / float(samples - 1)); + origin = vec2(0.5,0.5); + vec4 color = vec4(0.0); + float ws = 0.0; + vec2 center = vec2(0.5,0.5); + for(int i = 0; i <= samples; i++) + { + float p = (float(i)* precompute); + float w = 1.0 ; + color += texture(iChannel0, rotate(uv,origin, p)) * w; + ws += w; + } + + ALBEDO = vec4(color.rgb / ws * gain, 1.0).rgb; + //ALPHA = vec4(color.rgb / ws * gain, 1.0).r; + ALPHA = step(alpha_cut,1.0 - distance(center,UV)); + METALLIC = Metal; +} \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/data_viewer/BlurSprite3D.gdshader.uid b/Zennysoft.Game.Ma/src/data_viewer/BlurSprite3D.gdshader.uid new file mode 100644 index 00000000..369e47b2 --- /dev/null +++ b/Zennysoft.Game.Ma/src/data_viewer/BlurSprite3D.gdshader.uid @@ -0,0 +1 @@ +uid://o80s4yvp0rto diff --git a/Zennysoft.Game.Ma/src/data_viewer/DataViewer.cs b/Zennysoft.Game.Ma/src/data_viewer/DataViewer.cs index 32e86192..b439185b 100644 --- a/Zennysoft.Game.Ma/src/data_viewer/DataViewer.cs +++ b/Zennysoft.Game.Ma/src/data_viewer/DataViewer.cs @@ -1,16 +1,25 @@ using Chickensoft.AutoInject; using Chickensoft.Introspection; using Godot; +using System; +using System.Collections.Generic; using System.Linq; +using Zennysoft.Game.Abstractions; namespace Zennysoft.Game.Ma; +public interface IDataViewer +{ + +} + [Meta(typeof(IAutoNode))] -public partial class DataViewer : Control +public partial class DataViewer : Control, IDataViewer { public override void _Notification(int what) => this.Notify(what); - public IInstantiator Instantiator { get; set; } = default!; + [Dependency] + public IAppRepo AppRepo => this.DependOn(); [Export] public float _cameraSpeed = 0.01f; @@ -21,73 +30,135 @@ public partial class DataViewer : Control [Node] public Node3D ModelPivot { get; set; } = default!; - [Node] public DataViewerRepository DataViewerRepository { get; set; } = default!; - #region UI [Node] public RichTextLabel EnemyName { get; set; } = default!; [Node] public RichTextLabel Description { get; set; } = default!; + [Node] public Label HPValue { get; set; } = default!; + [Node] public Label ATKValue { get; set; } = default!; + [Node] public Label DEFValue { get; set; } = default!; + [Node] public Label Drop1Value { get; set; } = default!; + [Node] public Label Drop2Value { get; set; } = default!; + [Node] public Label AffinityValue { get; set; } = default!; + [Node] public Label WeaknessValue { get; set; } = default!; + + [Node] public Control EnemyInfo { get; set; } = default!; + + [Node] public Button BackButton { get; set; } = default!; #endregion - private EnemyModelView2D _currentModel; + private EnemyModelView _currentModel; + private float _cameraStartingPoint = 0f; + private int _currentIndex = 0; - private int _modelIndex = 0; + private List _enemies; - public void Initialize() + public void OnReady() { - Instantiator = new Instantiator(GetTree()); - LoadModel(); + BackButton.Pressed += BackButton_Pressed; + _enemies = [.. ModelPivot.GetChildren().Cast()]; + _currentModel = _enemies.First(); + DisplayEnemy(); + } + + public void OnEnterTree() => GetTree().Paused = false; + + public void OnExitTree() => GetTree().Paused = false; + + private void BackButton_Pressed() => AppRepo.OnDataViewerExited(); + + public override void _Input(InputEvent @event) + { + if (BackButton.HasFocus() && @event.IsActionPressed(GameInputs.Interact)) + { + GetTree().Paused = false; + BackButton.ReleaseFocus(); + return; + } + + if (_currentModel == null || BackButton.HasFocus()) + return; + + if (@event.IsActionPressed(GameInputs.Attack)) + _currentModel.PlayPrimaryAttackAnimation(); + if (@event.IsActionPressed(GameInputs.InventorySort)) + _currentModel.PlaySecondaryAttackAnimation(); + if (Input.IsActionJustPressed(GameInputs.Inventory)) + _currentModel.PlayActivateAnimation(); + if (@event.IsActionPressed(GameInputs.EnemyViewerWalk)) + _currentModel.PlayWalkAnimation(); + if (@event.IsActionReleased(GameInputs.EnemyViewerWalk)) + _currentModel.PlayIdleAnimation(); + + if (@event.IsActionPressed(GameInputs.Interact)) + { + GetTree().Paused = true; + BackButton.GrabFocus(); + } + + if (@event.IsActionPressed(GameInputs.StrafeRight)) + { + // Load next model + _enemies[_currentIndex].Hide(); + if (_currentIndex == _enemies.Count - 1) + _currentIndex = 0; + else + _currentIndex++; + DisplayEnemy(); + } + if (@event.IsActionPressed(GameInputs.StrafeLeft)) + { + _enemies[_currentIndex].Hide(); + // Load previous model + if (_currentIndex == 0) + _currentIndex = _enemies.Count - 1; + else + _currentIndex--; + DisplayEnemy(); + } } public override void _Process(double delta) { - if (Input.IsActionPressed(GameInputs.MoveLeft)) - CameraPivot.RotateY(_cameraSpeed); - if (Input.IsActionPressed(GameInputs.MoveRight)) - CameraPivot.RotateY(-_cameraSpeed); - if (Input.IsActionPressed(GameInputs.StrafeLeft)) - Camera3D.Position = Camera3D.Position.MoveToward(CameraPivot.Position, (float)delta * 2f); - if (Input.IsActionPressed(GameInputs.StrafeRight)) - Camera3D.Position = Camera3D.Position.MoveToward(CameraPivot.Position, -(float)delta * 2f); + if (_currentModel == null || BackButton.HasFocus()) + return; - Camera3D.Position = Camera3D.Position.Clamp(new Vector3(0, 0, 1), new Vector3(0, 0, 4)); + var forwardStrength = Input.GetActionStrength(GameInputs.CameraForward); + Camera3D.Position = Camera3D.Position.MoveToward(CameraPivot.Position, _cameraSpeed * forwardStrength * (_cameraStartingPoint / 10)); + var backStrength = Input.GetActionStrength(GameInputs.CameraBack); + Camera3D.Position = Camera3D.Position.MoveToward(CameraPivot.Position, -_cameraSpeed * backStrength * (_cameraStartingPoint / 10)); + var leftStrength = Input.GetActionStrength(GameInputs.MoveLeft); + CameraPivot.RotateY(_cameraSpeed * leftStrength); + var rightStrength = Input.GetActionStrength(GameInputs.MoveRight); + CameraPivot.RotateY(-_cameraSpeed * rightStrength); + + Camera3D.Position = Camera3D.Position.Clamp(new Vector3(0, 0, _cameraStartingPoint / 2), new Vector3(0, 0, _cameraStartingPoint)); ModelPivot.Rotation = ModelPivot.Rotation.Clamp(Mathf.DegToRad(-60), Mathf.DegToRad(60)); - _currentModel.SetCurrentDirection(_currentModel.GlobalBasis, -CameraPivot.Basis.Z); - Description.Text = (-CameraPivot.RotationDegrees).ToString(); - if (Input.IsActionJustPressed(GameInputs.Attack)) - _currentModel.PlayPrimaryAttackAnimation(); - if (Input.IsActionJustPressed(GameInputs.AltAttack)) - _currentModel.PlaySecondaryAttackAnimation(); - if (Input.IsActionJustPressed(GameInputs.Inventory)) - _currentModel.PlayActivateAnimation(); - if (Input.IsActionPressed(GameInputs.StrafeRight)) - _currentModel.PlayWalkAnimation(); - if (Input.IsActionJustReleased(GameInputs.StrafeRight)) - _currentModel.PlayIdleAnimation(); - - if (Input.IsActionJustPressed(GameInputs.Next)) - { - // Load next model - _currentModel.CallDeferred(MethodName.QueueFree); - _modelIndex = (_modelIndex + 1) % DataViewerRepository.ModelRepository.Count; - GD.Print(_modelIndex); - CallDeferred(MethodName.LoadModel); - } - if (Input.IsActionJustPressed(GameInputs.Previous)) - { - // Load previous model - _currentModel.CallDeferred(MethodName.QueueFree); - _modelIndex = (_modelIndex - 1 < 0 ? DataViewerRepository.ModelRepository.Count : _modelIndex) - 1; - CallDeferred(MethodName.LoadModel); - } + if (_currentModel is EnemyModelView2D enemyModelView2D) + enemyModelView2D.SetCurrentDirection(_currentModel.GlobalBasis, -CameraPivot.Basis.Z); } - private void LoadModel() + private void DisplayEnemy() { - var modelScene = DataViewerRepository.ModelRepository.ElementAt(_modelIndex); - _currentModel = modelScene.Instantiate(); - ModelPivot.AddChild(_currentModel); - EnemyName.Text = _currentModel.EnemyLoreInfo.Name; - Description.Text = _currentModel.EnemyLoreInfo.Description; + _currentModel = _enemies[_currentIndex]; + + var size = _currentModel.GetSize(); + if (_currentModel is EnemyModelView2D) + _cameraStartingPoint = size.X / 50; + else + _cameraStartingPoint = size.X * 2; + + Camera3D.Position = new Vector3(Camera3D.Position.X, Camera3D.Position.Y, _cameraStartingPoint); + EnemyName.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Name : "Placeholder Text"; + Description.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Description : "Placeholder Text"; + HPValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.MaximumHP : "Placeholder Text"; + ATKValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.ATK : "Placeholder Text"; + DEFValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.DEF : "Placeholder Text"; + Drop1Value.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Drop1 : "Placeholder Text"; + Drop2Value.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Drop2 : "Placeholder Text"; + AffinityValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Affinity : "Placeholder Text"; + WeaknessValue.Text = _currentModel.EnemyLoreInfo != null ? _currentModel.EnemyLoreInfo.Weakness : "Placeholder Text"; + + _enemies[_currentIndex].Show(); } } diff --git a/Zennysoft.Game.Ma/src/data_viewer/DataViewer.tscn b/Zennysoft.Game.Ma/src/data_viewer/DataViewer.tscn index 7f491180..313fd321 100644 --- a/Zennysoft.Game.Ma/src/data_viewer/DataViewer.tscn +++ b/Zennysoft.Game.Ma/src/data_viewer/DataViewer.tscn @@ -1,28 +1,35 @@ -[gd_scene load_steps=22 format=3 uid="uid://c7wjbgbrdivol"] +[gd_scene load_steps=19 format=3 uid="uid://c7wjbgbrdivol"] [ext_resource type="Script" uid="uid://bgaflnnur26vk" path="res://src/data_viewer/DataViewer.cs" id="1_1qako"] -[ext_resource type="Theme" uid="uid://daxuhpmyxwxck" path="res://src/ui/inventory_menu/InventoryDialogueSelectionStyle.tres" id="2_bef6s"] -[ext_resource type="Texture2D" uid="uid://bg7elvikjtl36" path="res://src/map/assets/Sarcophagus/sarco altar_greeen2.png" id="3_3wl4s"] -[ext_resource type="PackedScene" uid="uid://c16i1gmg6yu5a" path="res://src/data_viewer/DataViewerRepository.tscn" id="3_ejdn0"] -[ext_resource type="PackedScene" uid="uid://bjg8wyvp8q6oc" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="4_bef6s"] -[ext_resource type="PackedScene" uid="uid://dcm53j3rncxdm" path="res://src/enemy/enemy_types/06. chariot/ChariotModelView.tscn" id="5_vk1lh"] -[ext_resource type="PackedScene" uid="uid://bimjnsu52y3xi" path="res://src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn" id="6_hpkd1"] -[ext_resource type="PackedScene" uid="uid://bup8c4x1na3aw" path="res://src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn" id="8_dvixg"] -[ext_resource type="PackedScene" uid="uid://bls3mcsyld4vy" path="res://src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn" id="9_utjpw"] -[ext_resource type="PackedScene" uid="uid://cu7n814hhtjwm" path="res://src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn" id="10_ylptw"] -[ext_resource type="PackedScene" uid="uid://c2i8ylr3y0bri" path="res://src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn" id="11_fm7p5"] -[ext_resource type="PackedScene" uid="uid://72lbcmp4bcx4" path="res://src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn" id="12_5hrw6"] -[ext_resource type="PackedScene" uid="uid://lc5koiqn1sca" path="res://src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn" id="13_5hrw6"] -[ext_resource type="PackedScene" uid="uid://dxwwfbt2mtmer" path="res://src/enemy/enemy_types/11. Palan/PalanModelView.tscn" id="14_3wl4s"] -[ext_resource type="PackedScene" uid="uid://drkaq6grim1fb" path="res://src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn" id="15_37gx6"] -[ext_resource type="PackedScene" uid="uid://bli0t0d6ommvi" path="res://src/enemy/enemy_types/04. sara/SaraModelView.tscn" id="16_alsxp"] -[ext_resource type="PackedScene" uid="uid://byd7cwxq1be6f" path="res://src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn" id="17_qov77"] -[ext_resource type="PackedScene" uid="uid://c5xijwxkg4pf6" path="res://src/enemy/enemy_types/05. ballos/BallosModelView.tscn" id="18_sxd8s"] -[ext_resource type="PackedScene" uid="uid://c5asojy73n44d" path="res://src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView2.tscn" id="19_gkucd"] +[ext_resource type="Texture2D" uid="uid://dsf5l6g8n1tkw" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Viewer_720_16_9.png" id="2_hpkd1"] +[ext_resource type="Texture2D" uid="uid://bophm5or5opdf" path="res://src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg" id="3_hpkd1"] +[ext_resource type="PackedScene" uid="uid://bimjnsu52y3xi" path="res://src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn" id="3_vk1lh"] +[ext_resource type="Shader" uid="uid://o80s4yvp0rto" path="res://src/data_viewer/BlurSprite3D.gdshader" id="4_vk1lh"] +[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="6_vk1lh"] +[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="7_dvixg"] +[ext_resource type="PackedScene" uid="uid://bjg8wyvp8q6oc" path="res://src/enemy/enemy_types/02. michael/MichaelModelView.tscn" id="8_ekqja"] +[ext_resource type="PackedScene" uid="uid://c5xijwxkg4pf6" path="res://src/enemy/enemy_types/05. ballos/BallosModelView.tscn" id="11_icshd"] +[ext_resource type="PackedScene" uid="uid://bid6f48l0q58o" path="res://src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn" id="19_qagkd"] +[ext_resource type="PackedScene" uid="uid://dnomfbym36ivg" path="res://src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn" id="20_bw7jv"] +[ext_resource type="PackedScene" uid="uid://l4413jwn0m8v" path="res://src/enemy/enemy_types/16. demon wall/DemonWallModelView.tscn" id="21_i7aes"] +[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="25_gdy4a"] +[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="26_br3ej"] -[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_dvixg"] -shading_mode = 0 -albedo_texture = ExtResource("3_3wl4s") +[sub_resource type="Environment" id="Environment_vk1lh"] + +[sub_resource type="CameraAttributesPhysical" id="CameraAttributesPhysical_dvixg"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_dvixg"] +render_priority = 0 +shader = ExtResource("4_vk1lh") +shader_parameter/iChannel0 = ExtResource("3_hpkd1") +shader_parameter/samples = 100 +shader_parameter/alpha_cut = 0.0 +shader_parameter/gain = 17.73 +shader_parameter/blur_x = 50.0 +shader_parameter/blur_y = 50.0 +shader_parameter/Rot_Angle = 4.9 +shader_parameter/Metal = 0.0 [sub_resource type="Environment" id="Environment_3wl4s"] background_mode = 1 @@ -37,131 +44,245 @@ grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 script = ExtResource("1_1qako") -_cameraSpeed = 0.015 +_cameraSpeed = 0.08 -[node name="CenterContainer" type="CenterContainer" parent="."] +[node name="TextureRect" type="TextureRect" parent="."] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +texture = ExtResource("2_hpkd1") -[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -layout_mode = 2 -theme_override_constants/separation = 0 -alignment = 1 +[node name="CenterContainer2" type="CenterContainer" parent="."] +layout_mode = 0 +offset_left = 69.0 +offset_top = 196.0 +offset_right = 900.0 +offset_bottom = 942.0 -[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -theme_override_constants/separation = 0 - -[node name="LeftPanel" type="Panel" parent="CenterContainer/VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(390, 0) -layout_mode = 2 -size_flags_horizontal = 3 - -[node name="EnemyName" type="RichTextLabel" parent="CenterContainer/VBoxContainer/HBoxContainer/LeftPanel"] -unique_name_in_owner = true -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme = ExtResource("2_bef6s") -text = "Placeholder Text" - -[node name="SubViewportContainer" type="SubViewportContainer" parent="CenterContainer/VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(500, 500) +[node name="SubViewportContainer" type="SubViewportContainer" parent="CenterContainer2"] +custom_minimum_size = Vector2(750, 600) layout_mode = 2 stretch = true -[node name="SubViewport" type="SubViewport" parent="CenterContainer/VBoxContainer/HBoxContainer/SubViewportContainer"] +[node name="SubViewport" type="SubViewport" parent="CenterContainer2/SubViewportContainer"] +process_mode = 1 own_world_3d = true handle_input_locally = false -size = Vector2i(500, 500) +size = Vector2i(750, 600) render_target_update_mode = 4 -[node name="ModelPivot" type="Node3D" parent="CenterContainer/VBoxContainer/HBoxContainer/SubViewportContainer/SubViewport"] +[node name="Light" type="OmniLight3D" parent="CenterContainer2/SubViewportContainer/SubViewport"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0.401216) +omni_range = 4096.0 + +[node name="ModelPivot" type="Node3D" parent="CenterContainer2/SubViewportContainer/SubViewport"] unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.82392, 0) -[node name="CameraPivot" type="Node3D" parent="CenterContainer/VBoxContainer/HBoxContainer/SubViewportContainer/SubViewport"] +[node name="Sproingy" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("3_vk1lh")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.26108, 0) +visible = false + +[node name="Michael" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("8_ekqja")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.20608, 0) +visible = false + +[node name="Ballos" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("11_icshd")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.23608, 0) +visible = false + +[node name="Horse Face" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("19_qagkd")] +visible = false + +[node name="Ox Face" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("20_bw7jv")] +visible = false + +[node name="Demon Wall" parent="CenterContainer2/SubViewportContainer/SubViewport/ModelPivot" instance=ExtResource("21_i7aes")] +visible = false + +[node name="CameraPivot" type="Node3D" parent="CenterContainer2/SubViewportContainer/SubViewport"] unique_name_in_owner = true -transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 1, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) -[node name="Camera3D" type="Camera3D" parent="CenterContainer/VBoxContainer/HBoxContainer/SubViewportContainer/SubViewport/CameraPivot"] +[node name="Camera3D" type="Camera3D" parent="CenterContainer2/SubViewportContainer/SubViewport/CameraPivot"] unique_name_in_owner = true -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -9.82023e-08, 0, 3.1233) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 5) +environment = SubResource("Environment_vk1lh") +attributes = SubResource("CameraAttributesPhysical_dvixg") -[node name="CSGCylinder3D" type="CSGCylinder3D" parent="CenterContainer/VBoxContainer/HBoxContainer/SubViewportContainer/SubViewport"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2.84891, 0) -radius = 1.5 -height = 5.46951 -material = SubResource("StandardMaterial3D_dvixg") +[node name="Sprite3D" type="Sprite3D" parent="CenterContainer2/SubViewportContainer/SubViewport/CameraPivot/Camera3D"] +transform = Transform3D(-1, 0, 8.74228e-08, 0, 1, 0, -8.74228e-08, 0, -1, 349.344, -203.088, -300) +material_override = SubResource("ShaderMaterial_dvixg") +pixel_size = 1.0 +billboard = 2 +transparent = false +texture_filter = 2 +texture = ExtResource("3_hpkd1") -[node name="RightPanel" type="Panel" parent="CenterContainer/VBoxContainer/HBoxContainer"] -custom_minimum_size = Vector2(390, 0) +[node name="MarginContainer" type="MarginContainer" parent="."] +layout_mode = 2 +anchor_left = 0.5 +anchor_top = 0.186 +anchor_right = 0.969 +anchor_bottom = 0.87 +offset_left = 13.0 +offset_top = 4.12 +offset_right = 5.5199 +offset_bottom = 3.3999 +theme_override_constants/margin_left = 25 +theme_override_constants/margin_top = 25 +theme_override_constants/margin_right = 25 + +[node name="EnemyInfo" type="VBoxContainer" parent="MarginContainer"] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 20 + +[node name="EnemyName" type="RichTextLabel" parent="MarginContainer/EnemyInfo"] +unique_name_in_owner = true +custom_minimum_size = Vector2(800, 50) +layout_mode = 2 +theme_override_fonts/normal_font = ExtResource("7_dvixg") +theme_override_font_sizes/normal_font_size = 40 +text = "Placeholder Text" + +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/EnemyInfo"] +custom_minimum_size = Vector2(0, 150) +layout_mode = 2 + +[node name="StatBlock" type="VBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer"] +custom_minimum_size = Vector2(300, 0) +layout_mode = 2 + +[node name="HPBlock" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/HPBlock"] +layout_mode = 2 +text = "HP" +label_settings = ExtResource("6_vk1lh") + +[node name="HPValue" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/HPBlock"] +unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 +text = "992" +label_settings = ExtResource("6_vk1lh") -[node name="TextEdit" type="RichTextLabel" parent="CenterContainer/VBoxContainer/HBoxContainer/RightPanel"] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme = ExtResource("2_bef6s") -text = "Placeholder Text" - -[node name="BottomPanel" type="Panel" parent="CenterContainer/VBoxContainer"] -custom_minimum_size = Vector2(0, 460) +[node name="ATKBlock" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock"] layout_mode = 2 -size_flags_vertical = 3 -[node name="ColorRect" type="ColorRect" parent="CenterContainer/VBoxContainer/BottomPanel"] -layout_mode = 1 -anchors_preset = 12 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 0 +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/ATKBlock"] +layout_mode = 2 +text = "ATK" +label_settings = ExtResource("6_vk1lh") -[node name="Description" type="RichTextLabel" parent="CenterContainer/VBoxContainer/BottomPanel"] +[node name="ATKValue" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/ATKBlock"] unique_name_in_owner = true -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -theme = ExtResource("2_bef6s") +layout_mode = 2 +size_flags_horizontal = 3 +text = "14" +label_settings = ExtResource("6_vk1lh") + +[node name="DEFBlock" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/DEFBlock"] +layout_mode = 2 +text = "DEF" +label_settings = ExtResource("6_vk1lh") + +[node name="DEFValue" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/StatBlock/DEFBlock"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +text = "15" +label_settings = ExtResource("6_vk1lh") + +[node name="DropsBlock" type="VBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer"] +custom_minimum_size = Vector2(300, 0) +layout_mode = 2 + +[node name="Drops" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock"] +layout_mode = 2 +text = "Drops:" +label_settings = ExtResource("6_vk1lh") + +[node name="FirstDrop" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/FirstDrop"] +layout_mode = 2 +text = "1." +label_settings = ExtResource("6_vk1lh") + +[node name="Drop1Value" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/FirstDrop"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +text = "???" +label_settings = ExtResource("6_vk1lh") + +[node name="SecondDrop" type="HBoxContainer" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/SecondDrop"] +layout_mode = 2 +text = "2." +label_settings = ExtResource("6_vk1lh") + +[node name="Drop2Value" type="Label" parent="MarginContainer/EnemyInfo/HBoxContainer/DropsBlock/SecondDrop"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +text = "Goddess Garb" +label_settings = ExtResource("6_vk1lh") + +[node name="AffinityBlock" type="VBoxContainer" parent="MarginContainer/EnemyInfo"] +custom_minimum_size = Vector2(300, 0) +layout_mode = 2 + +[node name="Affinity" type="HBoxContainer" parent="MarginContainer/EnemyInfo/AffinityBlock"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Affinity"] +layout_mode = 2 +text = "Affinity:" +label_settings = ExtResource("6_vk1lh") + +[node name="AffinityValue" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Affinity"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +text = "Metal" +label_settings = ExtResource("6_vk1lh") + +[node name="Weakness" type="HBoxContainer" parent="MarginContainer/EnemyInfo/AffinityBlock"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Weakness"] +layout_mode = 2 +text = "Weakness:" +label_settings = ExtResource("6_vk1lh") + +[node name="WeaknessValue" type="Label" parent="MarginContainer/EnemyInfo/AffinityBlock/Weakness"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +text = "Holy" +label_settings = ExtResource("6_vk1lh") + +[node name="Description" type="RichTextLabel" parent="MarginContainer/EnemyInfo"] +unique_name_in_owner = true +custom_minimum_size = Vector2(800, 625) +layout_mode = 2 +theme_override_fonts/normal_font = ExtResource("7_dvixg") +theme_override_font_sizes/normal_font_size = 30 text = "Placeholder Text" -[node name="Label" type="Label" parent="CenterContainer/VBoxContainer/BottomPanel"] -layout_mode = 1 -anchors_preset = 3 -anchor_left = 1.0 -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_left = -460.0 -offset_top = -228.0 -grow_horizontal = 0 -grow_vertical = 0 -theme = ExtResource("2_bef6s") -text = "Switch: L1/R1 or <- -> -Primary Attack: X (Space) -Secondary Attack: ◻ (RMB) -Activate: △ (E)" - -[node name="DataViewerRepository" parent="." instance=ExtResource("3_ejdn0")] -unique_name_in_owner = true -ModelRepository = Array[PackedScene]([ExtResource("5_vk1lh"), ExtResource("4_bef6s"), ExtResource("6_hpkd1"), ExtResource("8_dvixg"), ExtResource("9_utjpw"), ExtResource("10_ylptw"), ExtResource("11_fm7p5"), ExtResource("12_5hrw6"), ExtResource("13_5hrw6"), ExtResource("14_3wl4s"), ExtResource("15_37gx6"), ExtResource("16_alsxp"), ExtResource("17_qov77"), ExtResource("18_sxd8s"), ExtResource("19_gkucd")]) - [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource("Environment_3wl4s") @@ -170,3 +291,22 @@ transform = Transform3D(1, 0, 0, 0, -0.31977, 0.947495, 0, -0.947495, -0.31977, light_energy = 8.943 spot_range = 9.00889 spot_attenuation = 3.45 + +[node name="BackButton" type="Button" parent="."] +unique_name_in_owner = true +layout_mode = 0 +offset_left = 1671.0 +offset_top = 972.0 +offset_right = 1803.0 +offset_bottom = 1028.0 +theme_override_styles/focus = ExtResource("25_gdy4a") +theme_override_styles/disabled_mirrored = ExtResource("26_br3ej") +theme_override_styles/disabled = ExtResource("26_br3ej") +theme_override_styles/hover_pressed_mirrored = ExtResource("26_br3ej") +theme_override_styles/hover_pressed = ExtResource("26_br3ej") +theme_override_styles/hover_mirrored = ExtResource("26_br3ej") +theme_override_styles/hover = ExtResource("26_br3ej") +theme_override_styles/pressed_mirrored = ExtResource("26_br3ej") +theme_override_styles/pressed = ExtResource("26_br3ej") +theme_override_styles/normal_mirrored = ExtResource("26_br3ej") +theme_override_styles/normal = ExtResource("26_br3ej") diff --git a/Zennysoft.Game.Ma/src/data_viewer/DataViewerRepository.cs b/Zennysoft.Game.Ma/src/data_viewer/DataViewerRepository.cs deleted file mode 100644 index 29b94026..00000000 --- a/Zennysoft.Game.Ma/src/data_viewer/DataViewerRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Chickensoft.AutoInject; -using Chickensoft.Introspection; -using Godot; - -namespace Zennysoft.Game.Ma; - -[Meta(typeof(IAutoNode))] -public partial class DataViewerRepository : Node -{ - [Export] - public Godot.Collections.Array ModelRepository; -} \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/data_viewer/DataViewerRepository.tscn b/Zennysoft.Game.Ma/src/data_viewer/DataViewerRepository.tscn deleted file mode 100644 index 98853f30..00000000 --- a/Zennysoft.Game.Ma/src/data_viewer/DataViewerRepository.tscn +++ /dev/null @@ -1,6 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://c16i1gmg6yu5a"] - -[ext_resource type="Script" uid="uid://03k48fke03vu" path="res://src/data_viewer/DataViewerRepository.cs" id="1_1cvot"] - -[node name="DataViewerRepository" type="Node"] -script = ExtResource("1_1cvot") diff --git a/Zennysoft.Game.Ma/src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg b/Zennysoft.Game.Ma/src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg new file mode 100644 index 00000000..6cd7f3f8 Binary files /dev/null and b/Zennysoft.Game.Ma/src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg differ diff --git a/Zennysoft.Game.Ma/src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg.import b/Zennysoft.Game.Ma/src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg.import new file mode 100644 index 00000000..f2afddd2 --- /dev/null +++ b/Zennysoft.Game.Ma/src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bophm5or5opdf" +path="res://.godot/imported/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg-c763a9fd7b565d1015c74205c4c551f8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/data_viewer/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg" +dest_files=["res://.godot/imported/bafkreicavupacvvhtig6ii2zb3svww7luvmuknyttza6s4doxm4oursnzm.jpg-c763a9fd7b565d1015c74205c4c551f8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=0 diff --git a/Zennysoft.Game.Ma/src/enemy/EnemyLoreInfo.cs b/Zennysoft.Game.Ma/src/enemy/EnemyLoreInfo.cs index 7a8993fc..4e7b7b33 100644 --- a/Zennysoft.Game.Ma/src/enemy/EnemyLoreInfo.cs +++ b/Zennysoft.Game.Ma/src/enemy/EnemyLoreInfo.cs @@ -10,4 +10,24 @@ public partial class EnemyLoreInfo : Resource [Export] public string Description { get; set; } + + [Export] + public string MaximumHP { get; set; } + + [Export] public string ATK { get; set; } + + [Export] public string DEF { get; set; } + + [Export] + public string Affinity { get; set; } + + [Export] + public string Weakness { get; set; } + + [Export] + public string Drop1 { get; set; } + + [Export] + public string Drop2 { get; set; } + } diff --git a/Zennysoft.Game.Ma/src/enemy/EnemyModelView.cs b/Zennysoft.Game.Ma/src/enemy/EnemyModelView.cs index b24bee47..1fc47106 100644 --- a/Zennysoft.Game.Ma/src/enemy/EnemyModelView.cs +++ b/Zennysoft.Game.Ma/src/enemy/EnemyModelView.cs @@ -41,6 +41,8 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView [Export] public bool CanMove { get; set; } = false; + [Export] public EnemyLoreInfo EnemyLoreInfo { get; set; } = default!; + public void OnReady() { if (AnimationTree != null) @@ -50,32 +52,50 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView } } + public virtual Vector2 GetSize() + { + return Vector2.Zero; + } + public virtual void PlayPrimaryAttackAnimation() { + if (!AnimationTree.HasAnimation("primary_attack")) + return; _walkSFX.Stop(); _stateMachine.Travel(_primaryAttackName, false); } public virtual void PlaySecondaryAttackAnimation() { + if (!AnimationTree.HasAnimation("secondary_attack")) + return; _walkSFX.Stop(); _stateMachine.Travel(_secondaryAttackName, false); } public virtual void PlayPrimarySkillAnimation() { + if (!AnimationTree.HasAnimation("teleport")) + return; + _walkSFX.Stop(); _stateMachine.Travel(_primarySkillName, false); } public virtual void PlayIdleAnimation() { + if (!AnimationTree.HasAnimation("idle_front")) + return; + _walkSFX.Stop(); _stateMachine.Travel(_idleName, false); } public virtual void PlayWalkAnimation() { + if (!AnimationTree.HasAnimation("idle_front_walking")) + return; + if (!_walkSFX.Playing) _walkSFX.Play(); _stateMachine.Travel(_walkingName, false); @@ -89,6 +109,9 @@ public abstract partial class EnemyModelView : Node3D, IEnemyModelView public virtual void PlayActivateAnimation() { + if (!AnimationTree.HasAnimation(_activateFront)) + return; + _walkSFX.Stop(); _stateMachine.Travel(_activateName, false); } diff --git a/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs b/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs index 25f52e2e..10397d6f 100644 --- a/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs +++ b/Zennysoft.Game.Ma/src/enemy/EnemyModelView2D.cs @@ -10,10 +10,10 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView { public override void _Notification(int what) => this.Notify(what); - [Export] public EnemyLoreInfo EnemyLoreInfo { get; set; } = default!; - [Node] public AnimatedSprite2D AnimatedSprite { get; set; } = default!; + [Node] public Sprite3D Sprite3D { get; set; } = default!; + [Node] public Area3D Hitbox { get; set; } = default!; [Node] public AnimationPlayer AnimationPlayer { get; set; } = default!; @@ -30,8 +30,14 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView public new void OnReady() { - Hitbox.AreaEntered += Hitbox_AreaEntered; - base.OnReady(); + Hitbox.AreaEntered += Hitbox_AreaEntered; + base.OnReady(); + } + + + public override Vector2 GetSize() + { + return Sprite3D.GetItemRect().Size; } private void Hitbox_AreaEntered(Area3D area) => OnPlayerHit(new AttackEventArgs(AttackData)); @@ -40,102 +46,102 @@ public partial class EnemyModelView2D : EnemyModelView, IEnemyModelView public override void PlayHitAnimation() { - LoadShader("res://src/vfx/shaders/DamageHit.gdshader"); - var tweener = GetTree().CreateTween(); - tweener.TweenMethod(Callable.From((float x) => SetShaderValue(x)), 0.0f, 1.0f, 1.0f); + LoadShader("res://src/vfx/shaders/DamageHit.gdshader"); + var tweener = GetTree().CreateTween(); + tweener.TweenMethod(Callable.From((float x) => SetShaderValue(x)), 0.0f, 1.0f, 1.0f); } public override void PlayDeathAnimation() { - LoadShader("res://src/vfx/shaders/PixelMelt.gdshader"); - var tweener = GetTree().CreateTween(); - tweener.TweenMethod(Callable.From((float x) => SetShaderValue(x)), 0.0f, 1.0f, 0.8f); + LoadShader("res://src/vfx/shaders/PixelMelt.gdshader"); + var tweener = GetTree().CreateTween(); + tweener.TweenMethod(Callable.From((float x) => SetShaderValue(x)), 0.0f, 1.0f, 0.8f); } private EnemyDirection GetEnemyDirection( - Basis enemyBasis, - Vector3 cameraDirection, - float rotateUpperThreshold, - float rotateLowerThreshold) + Basis enemyBasis, + Vector3 cameraDirection, + float rotateUpperThreshold, + float rotateLowerThreshold) { - var enemyForwardDirection = enemyBasis.Z; - var enemyLeftDirection = enemyBasis.X; + var enemyForwardDirection = enemyBasis.Z; + var enemyLeftDirection = enemyBasis.X; - var leftDotProduct = enemyLeftDirection.Dot(cameraDirection); - var forwardDotProduct = enemyForwardDirection.Dot(cameraDirection); + var leftDotProduct = enemyLeftDirection.Dot(cameraDirection); + var forwardDotProduct = enemyForwardDirection.Dot(cameraDirection); - // Check if forward facing. If the dot product is -1, the enemy is facing the camera. - if (forwardDotProduct < _lowerThreshold) - { - SetForward(); - return EnemyDirection.Forward; - } + // Check if forward facing. If the dot product is -1, the enemy is facing the camera. + if (forwardDotProduct < _lowerThreshold) + { + SetForward(); + return EnemyDirection.Forward; + } - // Check if backward facing. If the dot product is 1, the enemy is facing the same direction as the camera. - else if (forwardDotProduct > rotateUpperThreshold) - { - SetBack(); - return EnemyDirection.Backward; - } - else - { - // If the dot product of the perpendicular direction is positive (up to 1), the enemy is facing to the left (since it's mirrored). - if (leftDotProduct < _lowerThreshold) - { - SetRight(); - return EnemyDirection.Left; - } + // Check if backward facing. If the dot product is 1, the enemy is facing the same direction as the camera. + else if (forwardDotProduct > rotateUpperThreshold) + { + SetBack(); + return EnemyDirection.Backward; + } + else + { + // If the dot product of the perpendicular direction is positive (up to 1), the enemy is facing to the left (since it's mirrored). + if (leftDotProduct < _lowerThreshold) + { + SetRight(); + return EnemyDirection.Left; + } - // Check if side facing. If the dot product is close to zero in the positive or negative direction, its close to the threshold for turning. - if (leftDotProduct > rotateUpperThreshold) - { - SetLeft(); - return EnemyDirection.Right; - } - } + // Check if side facing. If the dot product is close to zero in the positive or negative direction, its close to the threshold for turning. + if (leftDotProduct > rotateUpperThreshold) + { + SetLeft(); + return EnemyDirection.Right; + } + } - return _enemyDirection; + return _enemyDirection; } private void LoadShader(string shaderPath) { - var shader = GD.Load(shaderPath); - var sprites = FindChildren("*", "AnimatedSprite2D", true).Cast(); - foreach (var sprite in sprites) - { - sprite.Material = new ShaderMaterial(); - var shaderMaterial = (ShaderMaterial)sprite.Material; - shaderMaterial.Shader = shader; - } + var shader = GD.Load(shaderPath); + var sprites = FindChildren("*", "AnimatedSprite2D", true).Cast(); + foreach (var sprite in sprites) + { + sprite.Material = new ShaderMaterial(); + var shaderMaterial = (ShaderMaterial)sprite.Material; + shaderMaterial.Shader = shader; + } } private void SetShaderValue(float shaderValue) { - var sprites = FindChildren("*", "AnimatedSprite2D", true).Cast(); - foreach (var sprite in sprites) - { - var shaderMaterial = (ShaderMaterial)sprite.Material; - shaderMaterial.SetShaderParameter("progress", shaderValue); - } + var sprites = FindChildren("*", "AnimatedSprite2D", true).Cast(); + foreach (var sprite in sprites) + { + var shaderMaterial = (ShaderMaterial)sprite.Material; + shaderMaterial.SetShaderParameter("progress", shaderValue); + } } private void SetForward() { - _enemyDirection = EnemyDirection.Forward; + _enemyDirection = EnemyDirection.Forward; } private void SetLeft() { - _enemyDirection = EnemyDirection.Left; + _enemyDirection = EnemyDirection.Left; } private void SetRight() { - _enemyDirection = EnemyDirection.Right; + _enemyDirection = EnemyDirection.Right; } private void SetBack() { - _enemyDirection = EnemyDirection.Backward; + _enemyDirection = EnemyDirection.Backward; } } diff --git a/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs b/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs index 0ca1b924..871955ec 100644 --- a/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs +++ b/Zennysoft.Game.Ma/src/enemy/EnemyModelView3D.cs @@ -13,6 +13,12 @@ public partial class EnemyModelView3D : EnemyModelView [Node] public MeshInstance3D MeshInstance { get; set; } = default!; + public override Vector2 GetSize() + { + var aabb = MeshInstance.GetAabb(); + return new Vector2(aabb.Size.X, aabb.Position.Abs().Y); + } + private void ChangeMaterial() { var material = new StandardMaterial3D diff --git a/Zennysoft.Game.Ma/src/enemy/IEnemyModelView.cs b/Zennysoft.Game.Ma/src/enemy/IEnemyModelView.cs index 38340e16..0b11a1e9 100644 --- a/Zennysoft.Game.Ma/src/enemy/IEnemyModelView.cs +++ b/Zennysoft.Game.Ma/src/enemy/IEnemyModelView.cs @@ -7,6 +7,8 @@ namespace Zennysoft.Game.Ma; public interface IEnemyModelView : INode3D { + public EnemyLoreInfo EnemyLoreInfo { get; } + public void PlayIdleAnimation(); public void PlayWalkAnimation(); diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn index 3514c413..210317ce 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/01. sproingy/SproingyModelView.tscn @@ -658,6 +658,7 @@ script = ExtResource("1_oh25a") EnemyLoreInfo = SubResource("Resource_ivy74") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0) pixel_size = 0.001 billboard = 2 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn index 47ea1b1c..17add1f3 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/02. michael/MichaelModelView.tscn @@ -1179,6 +1179,7 @@ script = ExtResource("1_o4cc2") EnemyLoreInfo = SubResource("Resource_gby04") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.086869, 0) billboard = 2 shaded = true diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn index b11969be..28b82ca3 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/03. filth_eater/FilthEaterModelView.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=421 format=3 uid="uid://bup8c4x1na3aw"] +[gd_scene load_steps=420 format=3 uid="uid://bup8c4x1na3aw"] [ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_718m1"] [ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_krqul"] @@ -209,12 +209,6 @@ Name = "Filth Eater" Description = "yuck" metadata/_custom_type_script = "uid://dlsgyx4i1jmp3" -[sub_resource type="Resource" id="Resource_e5pq0"] -script = ExtResource("3_4h5gj") -Damage = 10 -ElementType = 0 -metadata/_custom_type_script = "uid://ctshiyffvt4y5" - [sub_resource type="ViewportTexture" id="ViewportTexture_7tggm"] viewport_path = NodePath("Sprite3D/SubViewportContainer/SubViewport") @@ -3309,9 +3303,9 @@ _data = { transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0) script = ExtResource("1_718m1") EnemyLoreInfo = SubResource("Resource_pyy2h") -AttackData = SubResource("Resource_e5pq0") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.0862446, 0) billboard = 2 shaded = true diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/SaraModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/SaraModelView.tscn index 8d9dfb68..125db03e 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/SaraModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/04. sara/SaraModelView.tscn @@ -1828,6 +1828,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.31442, 0) script = ExtResource("1_oh25a") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -1.31336, 0) pixel_size = 0.005 billboard = 1 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 9229294d..01cda60a 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 @@ -1471,6 +1471,7 @@ _data = { script = ExtResource("1_ueqp5") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.0275542, 0) billboard = 2 alpha_cut = 1 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.cs b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.cs index f0d05341..7cbf9934 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.cs +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/06. chariot/ChariotModelView.cs @@ -14,8 +14,8 @@ public partial class ChariotModelView : EnemyModelView2D, IEnemyModelView public override void PlayActivateAnimation() { - _stateMachine.Travel(_activateName); - var scrollStateMachine = (AnimationNodeStateMachinePlayback)ScrollAnimationTree.Get(_parametersPlayback); - scrollStateMachine.Travel(_activateName); + _stateMachine.Travel(_activateName); + var scrollStateMachine = (AnimationNodeStateMachinePlayback)ScrollAnimationTree.Get(_parametersPlayback); + scrollStateMachine.Travel(_activateName); } } diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn index 159c3e8c..94e07d34 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/07. chinthe/ChintheModelView.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=505 format=3 uid="uid://byd7cwxq1be6f"] +[gd_scene load_steps=503 format=3 uid="uid://byd7cwxq1be6f"] [ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_6dej3"] [ext_resource type="Texture2D" uid="uid://dnd6d5cx7x7i8" path="res://src/enemy/enemy_types/07. chinthe/animations/CHINTHE - RERENDER/BACK/0400.png" id="2_3sdh3"] -[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="2_keq07"] [ext_resource type="Texture2D" uid="uid://c0unwba144tls" path="res://src/enemy/enemy_types/07. chinthe/animations/CHINTHE - RERENDER/BACK/0402.png" id="3_dbwem"] [ext_resource type="Texture2D" uid="uid://ca1im2so1vkym" path="res://src/enemy/enemy_types/07. chinthe/animations/CHINTHE - RERENDER/BACK/0404.png" id="4_y7pe6"] [ext_resource type="Texture2D" uid="uid://cgnm3v0t63aiw" path="res://src/enemy/enemy_types/07. chinthe/animations/CHINTHE - RERENDER/BACK/0406.png" id="5_xu4hf"] @@ -401,12 +400,6 @@ [ext_resource type="AnimationNodeStateMachine" uid="uid://cbq8xog50cjjy" path="res://src/enemy/animation_state_machines/PrimaryAttackStateMachine.tres" id="394_ldtka"] [ext_resource type="Texture2D" uid="uid://c7pf2dib2ilhs" path="res://src/vfx/Enemy/CHINTHE_BLAST.png" id="395_ymova"] -[sub_resource type="Resource" id="Resource_w4c47"] -script = ExtResource("2_keq07") -Damage = 10 -ElementType = 0 -metadata/_custom_type_script = "uid://ctshiyffvt4y5" - [sub_resource type="ViewportTexture" id="ViewportTexture_h1kaf"] viewport_path = NodePath("Sprite3D/SubViewportContainer/SubViewport") @@ -3071,6 +3064,7 @@ advance_mode = 2 [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_li182"] states/Start/position = Vector2(273, 100) transitions = ["Start", "End", SubResource("AnimationNodeStateMachineTransition_li182")] +graph_offset = Vector2(-179, 5) [sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_li182"] animation = &"teleport in" @@ -3231,7 +3225,7 @@ states/Start/position = Vector2(199, 100) states/Walking/node = SubResource("AnimationNodeStateMachine_7dl50") states/Walking/position = Vector2(348, 400.144) transitions = ["Start", "Unactivated Idle", SubResource("AnimationNodeStateMachineTransition_umemc"), "Unactivated Idle", "Activate", SubResource("AnimationNodeStateMachineTransition_t3xhd"), "Activate", "Idle", SubResource("AnimationNodeStateMachineTransition_5jjkq"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_keq07"), "Idle", "Primary Skill", SubResource("AnimationNodeStateMachineTransition_manul"), "Primary Skill", "Teleport In", SubResource("AnimationNodeStateMachineTransition_auprl"), "Teleport In", "Idle", SubResource("AnimationNodeStateMachineTransition_i5vf2"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_jbhro"), "Stop Walk", "Idle", SubResource("AnimationNodeStateMachineTransition_yu6fp"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_sgkk0"), "Walking", "Stop Walk", SubResource("AnimationNodeStateMachineTransition_8e7of")] -graph_offset = Vector2(-196.563, 38.1444) +graph_offset = Vector2(-331.563, 123.457) [sub_resource type="AtlasTexture" id="AtlasTexture_tawq7"] atlas = ExtResource("395_ymova") @@ -3494,9 +3488,9 @@ rings = 8 [node name="EnemyModelView" type="Node3D"] script = ExtResource("1_6dej3") -AttackData = SubResource("Resource_w4c47") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0, 0) pixel_size = 0.005 billboard = 2 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn index 430197d0..c28e38d3 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08a. Ambassador/AmbassadorModelView.tscn @@ -2003,6 +2003,7 @@ script = ExtResource("1_h27bt") EnemyLoreInfo = SubResource("Resource_f45wt") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.765249, 0) pixel_size = 0.02 billboard = 2 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn index 2d5c7aa1..71608df5 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08b. Ambassador (red)/AmbassadorSmallModelView.tscn @@ -1946,6 +1946,7 @@ script = ExtResource("1_a8qtn") EnemyLoreInfo = SubResource("Resource_f45wt") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -0.941682, 0) pixel_size = 0.015 billboard = 2 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn index bc1616bd..fb7a0cb5 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/08c. Ambassador (steel)/AmbassadorSteelModelView.tscn @@ -2007,6 +2007,7 @@ script = ExtResource("1_s0qsg") EnemyLoreInfo = SubResource("Resource_f45wt") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -0.765249, 0) billboard = 2 shaded = true diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn index f08d9dc1..1f5433e7 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/09. Agni/AgniDemonModelView.tscn @@ -2082,7 +2082,7 @@ script = ExtResource("1_wl7dh") EnemyLoreInfo = SubResource("Resource_f45wt") [node name="Sprite3D" type="Sprite3D" parent="."] -transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -1.11516, 0) +unique_name_in_owner = true billboard = 2 texture_filter = 0 render_priority = 100 @@ -2090,28 +2090,25 @@ texture = SubResource("ViewportTexture_h1kaf") [node name="SubViewportContainer" type="SubViewportContainer" parent="Sprite3D"] visibility_layer = 0 -offset_right = 40.0 -offset_bottom = 40.0 +offset_right = 512.0 +offset_bottom = 512.0 [node name="SubViewport" type="SubViewport" parent="Sprite3D/SubViewportContainer"] disable_3d = true transparent_bg = true handle_input_locally = false -size = Vector2i(1000, 1000) render_target_update_mode = 4 [node name="AnimatedSprite" type="AnimatedSprite2D" parent="Sprite3D/SubViewportContainer/SubViewport"] unique_name_in_owner = true texture_filter = 1 -position = Vector2(507, 425) -scale = Vector2(0.5, 0.5) sprite_frames = SubResource("SpriteFrames_6drt6") animation = &"idle_front" +offset = Vector2(250, 150) [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Sprite3D/SubViewportContainer/SubViewport"] -position = Vector2(508, 425) -scale = Vector2(0.5, 0.5) sprite_frames = SubResource("SpriteFrames_d844v") +offset = Vector2(250, 150) [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/10. Eden Pillar/EdenPillarModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/10. Eden Pillar/EdenPillarModelView.tscn index 17449712..1a9eb7fb 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/10. Eden Pillar/EdenPillarModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/10. Eden Pillar/EdenPillarModelView.tscn @@ -175,7 +175,7 @@ length = 0.001 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("MeshInstance:material_override") +tracks/0/path = NodePath("EdenPillar/MeshInstance:material_override") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -187,7 +187,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("MeshInstance:material_override:transparency") +tracks/1/path = NodePath("EdenPillar/MeshInstance:material_override:transparency") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -199,7 +199,7 @@ tracks/1/keys = { tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("MeshInstance:transparency") +tracks/2/path = NodePath("EdenPillar/MeshInstance:transparency") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { @@ -215,7 +215,7 @@ step = 0.0833333 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("MeshInstance:transparency") +tracks/0/path = NodePath("EdenPillar/MeshInstance:transparency") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -227,7 +227,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("MeshInstance:material_override") +tracks/1/path = NodePath("EdenPillar/MeshInstance:material_override") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -244,7 +244,7 @@ step = 0.0833333 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true -tracks/0/path = NodePath("MeshInstance:material_override") +tracks/0/path = NodePath("EdenPillar/MeshInstance:material_override") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { @@ -256,7 +256,7 @@ tracks/0/keys = { tracks/1/type = "value" tracks/1/imported = false tracks/1/enabled = true -tracks/1/path = NodePath("MeshInstance:material_override:transparency") +tracks/1/path = NodePath("EdenPillar/MeshInstance:material_override:transparency") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/keys = { @@ -268,7 +268,7 @@ tracks/1/keys = { tracks/2/type = "value" tracks/2/imported = false tracks/2/enabled = true -tracks/2/path = NodePath("MeshInstance:transparency") +tracks/2/path = NodePath("EdenPillar/MeshInstance:transparency") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/keys = { @@ -288,28 +288,32 @@ _data = { [sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_qhmtu"] [node name="EdenPillarModelView" type="Node3D"] -transform = Transform3D(0.9, 0, 0, 0, 0.9, 0, 0, 0, 0.9, 0, 0, 0) script = ExtResource("1_qhmtu") -[node name="MeshInstance" type="MeshInstance3D" parent="."] +[node name="EdenPillar" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.28807, 0) + +[node name="MeshInstance" type="MeshInstance3D" parent="EdenPillar"] unique_name_in_owner = true -transform = Transform3D(-2.29567e-08, 0.525188, 0.290134, -0.6, -2.62268e-08, 0, 1.26821e-08, -0.290134, 0.525188, -0.00582695, 4.44911, -0.0565475) +transform = Transform3D(-2.29567e-08, 0.525188, 0.290134, -0.6, -2.62268e-08, -5.45934e-14, 1.26821e-08, -0.290134, 0.525188, -0.00582695, 4.44911, -0.0565475) mesh = SubResource("ArrayMesh_8pgwy") skeleton = NodePath("") -[node name="Firing" type="AudioStreamPlayer3D" parent="."] +[node name="Firing" type="AudioStreamPlayer3D" parent="EdenPillar"] -[node name="WalkSFX" type="AudioStreamPlayer3D" parent="."] +[node name="WalkSFX" type="AudioStreamPlayer3D" parent="EdenPillar"] unique_name_in_owner = true autoplay = true bus = &"SFX" -[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +[node name="AnimationPlayer" type="AnimationPlayer" parent="EdenPillar"] unique_name_in_owner = true +root_node = NodePath("../..") libraries = { &"": SubResource("AnimationLibrary_mi284") } -[node name="AnimationTree" type="AnimationTree" parent="."] +[node name="AnimationTree" type="AnimationTree" parent="EdenPillar"] unique_name_in_owner = true +root_node = NodePath("../..") tree_root = SubResource("AnimationNodeStateMachine_qhmtu") diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn index 82de3f12..1f3fa7b1 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/11. Palan/PalanModelView.tscn @@ -2891,6 +2891,7 @@ _data = { script = ExtResource("1_yke7o") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0.0366734, 0) pixel_size = 0.005 billboard = 1 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn index 723f5c41..27f9592a 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/ShieldModelView.tscn @@ -3404,6 +3404,7 @@ animations = [{ script = ExtResource("1_h8pla") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 1.12245, 0) billboard = 2 alpha_cut = 1 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/ATTACK-FRAME.png b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/ATTACK-FRAME.png index c5a6d492..17dbae8a 100644 Binary files a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/ATTACK-FRAME.png and b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/ATTACK-FRAME.png differ diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/New/Attack 2 Back/0090.png b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/New/Attack 2 Back/0090.png index 537a4f2f..32cf65e5 100644 Binary files a/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/New/Attack 2 Back/0090.png and b/Zennysoft.Game.Ma/src/enemy/enemy_types/12. Shield of Heaven/animations/New/Attack 2 Back/0090.png differ diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn index 5504f564..f1ff6c06 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/13. gold sproingy/GoldSproingyModelView.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=69 format=3 uid="uid://dobiqowi8mhfi"] +[gd_scene load_steps=67 format=3 uid="uid://dobiqowi8mhfi"] [ext_resource type="Script" uid="uid://cvr1qimxpignl" path="res://src/enemy/EnemyModelView2D.cs" id="1_7w22e"] [ext_resource type="Script" uid="uid://dlsgyx4i1jmp3" path="res://src/enemy/EnemyLoreInfo.cs" id="2_ca1o5"] -[ext_resource type="Script" uid="uid://ctshiyffvt4y5" path="res://src/system/AttackDataResource.cs" id="3_3rk4a"] [ext_resource type="Texture2D" uid="uid://bokmaslnp1a4u" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_FRONT/Layer 1.png" id="3_kfpgw"] [ext_resource type="Texture2D" uid="uid://bi5by5os5u7py" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_BACK/Layer 1.png" id="3_w6gcy"] [ext_resource type="Texture2D" uid="uid://ca5uvl08g0147" path="res://src/enemy/enemy_types/13. gold sproingy/animations/GOLD_SPROING_BACK/Layer 2.png" id="4_2o8qa"] @@ -58,12 +57,6 @@ Name = "Sproingy" Description = "He's smaller than I expected..." metadata/_custom_type_script = "uid://dlsgyx4i1jmp3" -[sub_resource type="Resource" id="Resource_8wbs7"] -script = ExtResource("3_3rk4a") -Damage = 10 -ElementType = 0 -metadata/_custom_type_script = "uid://ctshiyffvt4y5" - [sub_resource type="ViewportTexture" id="ViewportTexture_etb7g"] viewport_path = NodePath("Sprite3D/SubViewportContainer/SubViewport") @@ -608,9 +601,9 @@ transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition [node name="EnemyModelView" type="Node3D"] script = ExtResource("1_7w22e") EnemyLoreInfo = SubResource("Resource_ivy74") -AttackData = SubResource("Resource_8wbs7") [node name="Sprite3D" type="Sprite3D" parent="."] +unique_name_in_owner = true transform = Transform3D(6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0) pixel_size = 0.001 billboard = 2 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn index 84fc31b3..f40dc8a7 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/14. horse_head/HorseFaceModelView.tscn @@ -988,7 +988,7 @@ bones/0/name = "spine1" bones/0/parent = -1 bones/0/rest = Transform3D(1.49012e-06, 0.00846654, -0.999964, 2.93367e-08, 0.999964, 0.00846654, 1, -4.23752e-08, 1.49012e-06, 0.000155807, -0.00105953, -2.01735) bones/0/enabled = true -bones/0/position = Vector3(0.0996386, -0.279526, -1.53144) +bones/0/position = Vector3(0.0996386, -0.294616, -1.53144) bones/0/rotation = Quaternion(0.0256267, -0.805691, 0.0118477, 0.591662) bones/0/scale = Vector3(1, 1, 1) bones/1/name = "spine0" @@ -1017,7 +1017,7 @@ bones/4/parent = 3 bones/4/rest = Transform3D(0.901905, -0.410135, 0.135488, 0.412416, 0.910915, 0.0120912, -0.128377, 0.0449723, 0.990705, 2.5332e-07, 0.990515, -7.07805e-08) bones/4/enabled = true bones/4/position = Vector3(2.5332e-07, 0.990515, -7.07805e-08) -bones/4/rotation = Quaternion(0.00787143, 0.0673259, 0.209846, 0.975382) +bones/4/rotation = Quaternion(0.00648616, 0.0665248, 0.207275, 0.975997) bones/4/scale = Vector3(1, 1, 1) bones/5/name = "neck4" bones/5/parent = 4 @@ -1031,7 +1031,7 @@ bones/6/parent = 5 bones/6/rest = Transform3D(0.0598389, 0.98531, 0.15995, -0.975271, 0.0235553, 0.219755, 0.212759, -0.169144, 0.962353, 3.65078e-07, 1.40318, 0) bones/6/enabled = true bones/6/position = Vector3(3.65078e-07, 1.40318, 0) -bones/6/rotation = Quaternion(-0.343022, 0.0521047, -0.494747, 0.796772) +bones/6/rotation = Quaternion(-0.341528, 0.0519651, -0.490475, 0.800058) bones/6/scale = Vector3(1, 1, 1) bones/7/name = "Bone.007" bones/7/parent = 6 @@ -1066,7 +1066,7 @@ bones/11/parent = 1 bones/11/rest = Transform3D(0.981457, 0.0769315, -0.175568, 0.18837, -0.217537, 0.957703, 0.035485, -0.973015, -0.227995, -1.09896e-07, 3.84743, -2.10479e-07) bones/11/enabled = true bones/11/position = Vector3(-1.09896e-07, 3.84743, -2.10479e-07) -bones/11/rotation = Quaternion(-0.806075, -0.07973, -0.0234888, 0.585948) +bones/11/rotation = Quaternion(-0.806907, -0.0812587, -0.0235244, 0.584589) bones/11/scale = Vector3(1, 1, 1) bones/12/name = "arm2_L" bones/12/parent = 11 @@ -1093,7 +1093,7 @@ bones/15/name = "arm1_R" bones/15/parent = 1 bones/15/rest = Transform3D(-0.98213, 0.0512573, -0.181089, -0.187541, -0.185921, 0.964501, 0.0157694, 0.981227, 0.192212, 0.00107862, 3.8461, -0.0821097) bones/15/enabled = true -bones/15/position = Vector3(-0.202609, 3.65099, 0.0754982) +bones/15/position = Vector3(-0.199309, 3.62561, 0.0802962) bones/15/rotation = Quaternion(-0.502686, 0.531044, 0.680821, -0.0422068) bones/15/scale = Vector3(1, 1, 1) bones/16/name = "arm2_R" @@ -1108,7 +1108,7 @@ bones/17/parent = 16 bones/17/rest = Transform3D(0.998789, 0.0488077, -0.00615137, -0.0491113, 0.996528, -0.0672226, 0.00284903, 0.0674433, 0.997719, -5.21541e-08, 3.04263, -1.31503e-06) bones/17/enabled = true bones/17/position = Vector3(-5.21541e-08, 3.04263, -1.31503e-06) -bones/17/rotation = Quaternion(-0.0459497, 0.097357, 0.264908, 0.958245) +bones/17/rotation = Quaternion(-0.0422391, 0.0972348, 0.266217, 0.958066) bones/17/scale = Vector3(1, 1, 1) bones/18/name = "hand_R" bones/18/parent = 17 @@ -1121,7 +1121,7 @@ bones/19/name = "hip_L" bones/19/parent = -1 bones/19/rest = Transform3D(0.138486, 0.897208, 0.419333, -0.129033, -0.403458, 0.905854, 0.981923, -0.179556, 0.059896, 0.000155807, -0.00105953, -2.01735) bones/19/enabled = true -bones/19/position = Vector3(0.147751, -0.282267, -1.49267) +bones/19/position = Vector3(0.147751, -0.291, -1.49267) bones/19/rotation = Quaternion(0.427793, 0.34021, 0.687061, -0.478745) bones/19/scale = Vector3(1, 1, 1) bones/20/name = "leg1_L" @@ -1129,14 +1129,14 @@ bones/20/parent = 19 bones/20/rest = Transform3D(0.945603, 0.113405, 0.304916, -0.324072, 0.410457, 0.852351, -0.0284943, -0.9048, 0.424881, 2.08616e-07, 2.00996, -7.1153e-07) bones/20/enabled = true bones/20/position = Vector3(2.08616e-07, 2.00996, -7.1153e-07) -bones/20/rotation = Quaternion(-0.437808, -0.325257, -0.369348, 0.752405) +bones/20/rotation = Quaternion(-0.437352, -0.325827, -0.370051, 0.752079) bones/20/scale = Vector3(1, 1, 1) bones/21/name = "leg2_L" bones/21/parent = 20 bones/21/rest = Transform3D(0.990336, -0.138679, 0.00180777, 0.138628, 0.990193, 0.0173138, -0.00419111, -0.0168959, 0.999848, 5.96046e-08, 5.85994, -5.23403e-07) bones/21/enabled = true bones/21/position = Vector3(5.96046e-08, 5.85994, -5.23403e-07) -bones/21/rotation = Quaternion(-0.0475168, 0.00188995, 0.38009, 0.923726) +bones/21/rotation = Quaternion(-0.0476923, 0.00188875, 0.381494, 0.923138) bones/21/scale = Vector3(1, 1, 1) bones/22/name = "foot1_L" bones/22/parent = 21 @@ -1170,7 +1170,7 @@ bones/26/name = "hip_R" bones/26/parent = -1 bones/26/rest = Transform3D(0.138486, -0.897208, -0.419333, 0.129033, -0.403458, 0.905854, -0.981923, -0.179556, 0.059896, -0.000155807, -0.00105953, -2.01735) bones/26/enabled = true -bones/26/position = Vector3(0.0289172, -0.298136, -1.59603) +bones/26/position = Vector3(0.0289172, -0.303958, -1.59603) bones/26/rotation = Quaternion(0.695067, -0.09936, -0.377924, -0.603475) bones/26/scale = Vector3(1, 1, 1) bones/27/name = "leg1_R" @@ -1178,14 +1178,14 @@ bones/27/parent = 26 bones/27/rest = Transform3D(0.945603, -0.113405, -0.304916, 0.324072, 0.410457, 0.852351, 0.0284943, -0.9048, 0.424881, -9.54606e-09, 2.00996, -3.52971e-07) bones/27/enabled = true bones/27/position = Vector3(-9.54606e-09, 2.00996, -3.52971e-07) -bones/27/rotation = Quaternion(-0.317636, 0.174004, 0.183885, 0.913793) +bones/27/rotation = Quaternion(-0.316952, 0.174488, 0.183941, 0.913926) bones/27/scale = Vector3(1, 1, 1) bones/28/name = "leg2_R" bones/28/parent = 27 bones/28/rest = Transform3D(0.990336, 0.138679, -0.00180777, -0.138628, 0.990193, 0.0173138, 0.00419111, -0.0168959, 0.999848, 4.51691e-08, 5.85994, -3.72529e-09) bones/28/enabled = true bones/28/position = Vector3(4.51691e-08, 5.85994, -3.72529e-09) -bones/28/rotation = Quaternion(-0.268021, 0.0202226, -0.17488, 0.947192) +bones/28/rotation = Quaternion(-0.269003, 0.0202141, -0.17552, 0.946795) bones/28/scale = Vector3(1, 1, 1) bones/29/name = "foot1_R" bones/29/parent = 28 @@ -1222,12 +1222,12 @@ mesh = SubResource("ArrayMesh_6e63x") skin = SubResource("Skin_yvw71") [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(-0.370165, -0.13327, -0.919357, -0.258559, -0.935769, 0.239755, -0.892258, 0.326457, 0.311931, -2.00356, 8.78487, 6.14065) +transform = Transform3D(-0.370165, -0.13327, -0.919357, -0.263026, -0.934123, 0.241313, -0.890952, 0.33114, 0.310726, -2.00357, 8.77889, 6.15984) bone_name = "TOP OF SKULL" bone_idx = 8 [node name="BoneAttachment3D2" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(0.960238, 0.142738, 0.239935, -0.230152, -0.0817476, 0.969715, 0.158029, -0.986379, -0.0456457, -2.41576, 1.74228, -8.89334) +transform = Transform3D(0.960238, 0.142738, 0.239935, -0.23139, -0.073971, 0.970045, 0.15621, -0.986993, -0.0380017, -2.41575, 1.72785, -8.91814) bone_name = "hand_R" bone_idx = 18 diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn index bf7e632e..3d415441 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/15. ox_face/OxFaceModelView.tscn @@ -206,7 +206,7 @@ bones/0/name = "spine1" bones/0/parent = -1 bones/0/rest = Transform3D(1.49012e-06, 0.00846654, -0.999964, 2.93367e-08, 0.999964, 0.00846654, 1, -4.23752e-08, 1.49012e-06, 0.000155807, -0.00105953, -2.01735) bones/0/enabled = true -bones/0/position = Vector3(-0.260276, -1.05389, -1.96769) +bones/0/position = Vector3(-0.260019, -1.02446, -1.96967) bones/0/rotation = Quaternion(0.0915277, -0.692111, -0.0341586, 0.715149) bones/0/scale = Vector3(1, 1, 1) bones/1/name = "spine0" @@ -249,7 +249,7 @@ bones/6/parent = 5 bones/6/rest = Transform3D(0.0598389, 0.98531, 0.15995, -0.975271, 0.0235553, 0.219755, 0.212759, -0.169144, 0.962353, 3.65078e-07, 1.40318, 0) bones/6/enabled = true bones/6/position = Vector3(3.65078e-07, 1.40318, 0) -bones/6/rotation = Quaternion(-0.0520092, -0.295864, -0.744301, 0.596469) +bones/6/rotation = Quaternion(-0.0605755, -0.299004, -0.744536, 0.593796) bones/6/scale = Vector3(1, 1, 1) bones/7/name = "Bone.007" bones/7/parent = 6 @@ -284,7 +284,7 @@ bones/11/parent = 1 bones/11/rest = Transform3D(0.981457, 0.0769315, -0.175568, 0.18837, -0.217537, 0.957703, 0.035485, -0.973015, -0.227995, -1.09896e-07, 3.84743, -2.10479e-07) bones/11/enabled = true bones/11/position = Vector3(-1.09896e-07, 3.84743, -2.10479e-07) -bones/11/rotation = Quaternion(-0.779476, -0.0570599, 0.0822994, 0.618375) +bones/11/rotation = Quaternion(-0.781165, -0.058524, 0.0789656, 0.616539) bones/11/scale = Vector3(1, 0.999999, 1) bones/12/name = "arm2_L" bones/12/parent = 11 @@ -312,7 +312,7 @@ bones/15/parent = 1 bones/15/rest = Transform3D(-0.98213, 0.0512573, -0.181089, -0.187541, -0.185921, 0.964501, 0.0157694, 0.981227, 0.192212, 0.00107862, 3.8461, -0.0821097) bones/15/enabled = true bones/15/position = Vector3(0.00107886, 3.8461, -0.0821095) -bones/15/rotation = Quaternion(-0.21553, 0.745444, 0.613412, -0.146924) +bones/15/rotation = Quaternion(-0.21398, 0.743041, 0.616062, -0.150233) bones/15/scale = Vector3(1, 1, 1) bones/16/name = "arm2_R" bones/16/parent = 15 @@ -339,22 +339,22 @@ bones/19/name = "hip_L" bones/19/parent = -1 bones/19/rest = Transform3D(0.138486, 0.897208, 0.419333, -0.129033, -0.403458, 0.905854, 0.981923, -0.179556, 0.059896, 0.000155807, -0.00105953, -2.01735) bones/19/enabled = true -bones/19/position = Vector3(-0.381562, -1.20042, -1.71619) -bones/19/rotation = Quaternion(0.627767, 0.292688, 0.544975, -0.472487) +bones/19/position = Vector3(-0.357863, -1.178, -1.79428) +bones/19/rotation = Quaternion(0.622974, 0.298676, 0.553029, -0.465678) bones/19/scale = Vector3(1, 1, 1) bones/20/name = "leg1_L" bones/20/parent = 19 bones/20/rest = Transform3D(0.945603, 0.113405, 0.304916, -0.324072, 0.410457, 0.852351, -0.0284943, -0.9048, 0.424881, 2.08616e-07, 2.00996, -7.1153e-07) bones/20/enabled = true bones/20/position = Vector3(2.08616e-07, 2.00996, -7.1153e-07) -bones/20/rotation = Quaternion(-0.327925, -0.422597, -0.300857, 0.789533) +bones/20/rotation = Quaternion(-0.322869, -0.42834, -0.292442, 0.791681) bones/20/scale = Vector3(1, 0.999999, 1) bones/21/name = "leg2_L" bones/21/parent = 20 bones/21/rest = Transform3D(0.990336, -0.138679, 0.00180777, 0.138628, 0.990193, 0.0173138, -0.00419111, -0.0168959, 0.999848, 5.96046e-08, 5.85994, -5.23403e-07) bones/21/enabled = true bones/21/position = Vector3(5.96046e-08, 5.85994, -5.23403e-07) -bones/21/rotation = Quaternion(-0.0605445, 0.00129802, 0.49011, 0.869554) +bones/21/rotation = Quaternion(-0.0604396, 0.00129875, 0.489262, 0.870039) bones/21/scale = Vector3(1, 1, 1) bones/22/name = "foot1_L" bones/22/parent = 21 @@ -388,7 +388,7 @@ bones/26/name = "hip_R" bones/26/parent = -1 bones/26/rest = Transform3D(0.138486, -0.897208, -0.419333, 0.129033, -0.403458, 0.905854, -0.981923, -0.179556, 0.059896, -0.000155807, -0.00105953, -2.01735) bones/26/enabled = true -bones/26/position = Vector3(-0.0218232, -1.11395, -2.01917) +bones/26/position = Vector3(-0.0914828, -1.11395, -2.0187) bones/26/rotation = Quaternion(0.608697, -0.3155, -0.575514, -0.445793) bones/26/scale = Vector3(1, 1, 1) bones/27/name = "leg1_R" @@ -396,14 +396,14 @@ bones/27/parent = 26 bones/27/rest = Transform3D(0.945603, -0.113405, -0.304916, 0.324072, 0.410457, 0.852351, 0.0284943, -0.9048, 0.424881, -9.54606e-09, 2.00996, -3.52971e-07) bones/27/enabled = true bones/27/position = Vector3(-9.54606e-09, 2.00996, -3.52971e-07) -bones/27/rotation = Quaternion(-0.201704, 0.42497, 0.137533, 0.871666) +bones/27/rotation = Quaternion(-0.203553, 0.423945, 0.138932, 0.871513) bones/27/scale = Vector3(1, 0.999999, 1) bones/28/name = "leg2_R" bones/28/parent = 27 bones/28/rest = Transform3D(0.990336, 0.138679, -0.00180777, -0.138628, 0.990193, 0.0173138, 0.00419111, -0.0168959, 0.999848, 4.51691e-08, 5.85994, -3.72529e-09) bones/28/enabled = true bones/28/position = Vector3(4.51691e-08, 5.85994, -3.72529e-09) -bones/28/rotation = Quaternion(-0.0627068, -0.00116495, -0.500645, 0.863378) +bones/28/rotation = Quaternion(-0.0631419, -0.00116218, -0.50412, 0.861322) bones/28/scale = Vector3(1, 1, 1) bones/29/name = "foot1_R" bones/29/parent = 28 @@ -435,7 +435,7 @@ bones/32/rotation = Quaternion(0.456756, 0.539878, -0.539587, -0.456893) bones/32/scale = Vector3(1, 1, 1) [node name="BoneAttachment3D" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(-0.271443, -0.0440478, -0.961446, -0.333033, -0.932944, 0.136766, -0.902999, 0.357318, 0.238571, -1.68503, 8.20202, 4.95649) +transform = Transform3D(-0.281277, -0.0594146, -0.957786, -0.331575, -0.930592, 0.155103, -0.900522, 0.361205, 0.242053, -1.67626, 8.23547, 4.95359) bone_name = "TOP OF SKULL" bone_idx = 8 @@ -458,7 +458,7 @@ mesh = SubResource("ArrayMesh_5ew54") skin = SubResource("Skin_e330f") [node name="BoneAttachment3D2" type="BoneAttachment3D" parent="Armature/Skeleton3D"] -transform = Transform3D(-0.0477638, -0.00543313, -0.998843, -0.0797991, -0.996767, 0.00923727, -0.995664, 0.080149, 0.0471753, -6.32381, -1.21705, -0.163401) +transform = Transform3D(-0.046878, 0.0046197, -0.998889, -0.0819302, -0.996637, -0.000764847, -0.995533, 0.0818041, 0.0470983, -6.27641, -1.24577, -0.158031) bone_name = "hand_R" bone_idx = 18 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 176dcdaf..f571a867 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 @@ -340,47 +340,41 @@ script = ExtResource("1_r5yku") [node name="LeftArms" type="Node3D" parent="."] unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.25727, -7.67419, 0) [node name="Arm1" parent="LeftArms" instance=ExtResource("1_ell80")] unique_name_in_owner = true -AttackData = null [node name="Arm2" parent="LeftArms" instance=ExtResource("2_kblru")] unique_name_in_owner = true -AttackData = null [node name="Arm3" parent="LeftArms" instance=ExtResource("3_nqxqr")] unique_name_in_owner = true -AttackData = null [node name="Arm4" parent="LeftArms" instance=ExtResource("4_r5yku")] unique_name_in_owner = true -AttackData = null [node name="Arm5" parent="LeftArms" instance=ExtResource("5_5oa7x")] unique_name_in_owner = true -AttackData = null [node name="RightArms" type="Node3D" parent="."] unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.25727, -7.67419, 0) [node name="Arm6" parent="RightArms" instance=ExtResource("6_h1yna")] unique_name_in_owner = true -AttackData = null [node name="Arm7" parent="RightArms" instance=ExtResource("7_6s6sq")] unique_name_in_owner = true -AttackData = null [node name="Arm8" parent="RightArms" instance=ExtResource("8_e82oe")] unique_name_in_owner = true -AttackData = null [node name="Arm9" parent="RightArms" instance=ExtResource("9_c826n")] unique_name_in_owner = true -AttackData = null [node name="DEMON WALL BASE + PIPES" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.25727, -7.67419, 0) [node name="SMALL FACES" type="MeshInstance3D" parent="DEMON WALL BASE + PIPES"] mesh = SubResource("ArrayMesh_xb46g") @@ -432,10 +426,11 @@ skeleton = NodePath("") [node name="Rotation" type="Node3D" parent="."] unique_name_in_owner = true -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.11577, 9.46987, 4.38761) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.141497, 1.79568, 4.38761) [node name="OpposingWall" type="AnimatableBody3D" parent="."] unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.25727, -7.67419, 0) visible = false collision_layer = 2 collision_mask = 2 @@ -459,5 +454,6 @@ anim_player = NodePath("../AnimationPlayer") [node name="WalkSFX" type="AudioStreamPlayer3D" parent="."] unique_name_in_owner = true +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.25727, -7.67419, 0) autoplay = true bus = &"SFX" diff --git a/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn b/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn index 945aa715..99e1c447 100644 --- a/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn +++ b/Zennysoft.Game.Ma/src/enemy/enemy_types/9b. Aqueos Demon/AqueosModelView.tscn @@ -1996,6 +1996,7 @@ states/Idle/position = Vector2(481, 100) "states/Secondary Attack/node" = ExtResource("336_oklrx") "states/Secondary Attack/position" = Vector2(601, 252) transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_wr22k"), "Idle", "Primary Attack", SubResource("AnimationNodeStateMachineTransition_s1m3f"), "Idle", "Secondary Attack", SubResource("AnimationNodeStateMachineTransition_chae2"), "Primary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_rh3bi"), "Secondary Attack", "Idle", SubResource("AnimationNodeStateMachineTransition_ar8mh")] +graph_offset = Vector2(0, 25.9753) [sub_resource type="Animation" id="Animation_lsphj"] length = 0.001 @@ -2065,7 +2066,7 @@ script = ExtResource("1_vf7er") EnemyLoreInfo = ExtResource("2_ejhrk") [node name="Sprite3D" type="Sprite3D" parent="."] -transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -1.11516, 0) +unique_name_in_owner = true billboard = 2 texture_filter = 0 render_priority = 100 @@ -2080,21 +2081,18 @@ offset_bottom = 40.0 disable_3d = true transparent_bg = true handle_input_locally = false -size = Vector2i(1000, 1000) render_target_update_mode = 4 [node name="AnimatedSprite" type="AnimatedSprite2D" parent="Sprite3D/SubViewportContainer/SubViewport"] unique_name_in_owner = true texture_filter = 1 -position = Vector2(507, 440) -scale = Vector2(0.5, 0.5) sprite_frames = SubResource("SpriteFrames_6drt6") animation = &"idle_front" +offset = Vector2(250, 150) [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Sprite3D/SubViewportContainer/SubViewport"] -position = Vector2(508, 440) -scale = Vector2(0.5, 0.5) sprite_frames = SubResource("SpriteFrames_d844v") +offset = Vector2(250, 150) [node name="Hitbox" type="Area3D" parent="."] unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/game/Game.cs b/Zennysoft.Game.Ma/src/game/Game.cs index 44705434..4704b66d 100644 --- a/Zennysoft.Game.Ma/src/game/Game.cs +++ b/Zennysoft.Game.Ma/src/game/Game.cs @@ -40,7 +40,7 @@ public partial class Game : Node3D, IGame [Node] private IFloorClearMenu LoadNextLevel { get; set; } = default!; - [Node] private DeathMenu DeathMenu { get; set; } = default!; + [Node] private IGameOverMenu GameOverMenu { get; set; } = default!; [Node] private IPauseMenu PauseMenu { get; set; } = default!; #endregion @@ -171,8 +171,8 @@ public partial class Game : Node3D, IGame _map.FloorLoaded += OnFloorLoadFinished; _player.PlayerDied += GameOver; - DeathMenu.NewGame += OnNewGame; - DeathMenu.QuitGame += OnQuit; + GameOverMenu.NewGame += OnNewGame; + GameOverMenu.QuitGame += OnQuit; GameRepo.IsPaused.Sync += IsPaused_Sync; InGameUI.PlayerInfoUI.Activate(); @@ -521,8 +521,8 @@ public partial class Game : Node3D, IGame GameRepo.RestorativePickedUp -= GameEventDepot_RestorativePickedUp; - DeathMenu.NewGame -= OnNewGame; - DeathMenu.QuitGame -= OnQuit; + GameOverMenu.NewGame -= OnNewGame; + GameOverMenu.QuitGame -= OnQuit; GameRepo.IsPaused.Sync -= IsPaused_Sync; } diff --git a/Zennysoft.Game.Ma/src/game/Game.tscn b/Zennysoft.Game.Ma/src/game/Game.tscn index cfb5ad40..4f610b4f 100644 --- a/Zennysoft.Game.Ma/src/game/Game.tscn +++ b/Zennysoft.Game.Ma/src/game/Game.tscn @@ -4,7 +4,7 @@ [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://cgwiwufvxvfs4" path="res://src/ui/load_next_level/LoadNextLevel.tscn" id="7_yw8km"] [ext_resource type="Script" uid="uid://cbal5oeaha4nx" path="res://src/ui/pause_menu/PauseMenu.cs" id="11_5ng8c"] -[ext_resource type="PackedScene" uid="uid://dbtfgrtgpr4qg" path="res://src/ui/death_menu/DeathMenu.tscn" id="11_wypid"] +[ext_resource type="PackedScene" uid="uid://dbtfgrtgpr4qg" path="res://src/ui/game_over/GameOverMenu.tscn" id="11_wypid"] [ext_resource type="PackedScene" uid="uid://blbqgw3wosc1w" path="res://src/ui/pause_menu/PauseMenu.tscn" id="12_yev8k"] [node name="Game" type="Node3D"] @@ -35,7 +35,7 @@ process_mode = 1 unique_name_in_owner = true custom_minimum_size = Vector2(1280, 720) -[node name="DeathMenu" parent="." instance=ExtResource("11_wypid")] +[node name="GameOverMenu" parent="." instance=ExtResource("11_wypid")] unique_name_in_owner = true visible = false diff --git a/Zennysoft.Game.Ma/src/map/dungeon/floors/SetAFloors/test_floor.tscn b/Zennysoft.Game.Ma/src/map/dungeon/floors/SetAFloors/test_floor.tscn index 7f62a4b5..1173e830 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/floors/SetAFloors/test_floor.tscn +++ b/Zennysoft.Game.Ma/src/map/dungeon/floors/SetAFloors/test_floor.tscn @@ -230,7 +230,7 @@ visible = false mesh = SubResource("PlaneMesh_hkp1m") [node name="Eden Pillar" parent="." instance=ExtResource("14_hsujv")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.8435, 0, 0) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -17.8435, 1.77316, 0) [node name="CSGBox3D" type="CSGBox3D" parent="."] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.4918, 1.20905, -1.40112) diff --git a/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/34. Boss Floor B.tscn b/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/34. Boss Floor B.tscn index 28efe7be..60a59730 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/34. Boss Floor B.tscn +++ b/Zennysoft.Game.Ma/src/map/dungeon/floors/Special Floors/34. Boss Floor B.tscn @@ -1884,7 +1884,7 @@ shape = SubResource("BoxShape3D_bxvob") [node name="DemonWall" parent="." instance=ExtResource("25_k2q0o")] unique_name_in_owner = true -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.491528, 21.2936, 55.334) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.747, 29.191, 55.334) [node name="WorldEnvironment" type="WorldEnvironment" parent="."] environment = SubResource("Environment_qev6n") diff --git a/Zennysoft.Game.Ma/src/menu/LoadingScreen.tscn b/Zennysoft.Game.Ma/src/menu/LoadingScreen.tscn index ae2a8fb2..67ddf48d 100644 --- a/Zennysoft.Game.Ma/src/menu/LoadingScreen.tscn +++ b/Zennysoft.Game.Ma/src/menu/LoadingScreen.tscn @@ -1,12 +1,12 @@ -[gd_scene load_steps=4 format=3 uid="uid://cpjlj7kxdhv16"] +[gd_scene load_steps=5 format=3 uid="uid://cpjlj7kxdhv16"] [ext_resource type="Script" uid="uid://b07ueredevhr3" path="res://src/menu/LoadingScreen.cs" id="1_5uxhf"] +[ext_resource type="Texture2D" uid="uid://d2krh4u2v06k5" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Loading_720_16_9.png" id="2_xfkmi"] -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5uxhf"] -bg_color = Color(0.670689, 0.67069, 0.670689, 1) +[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_xfkmi"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xfkmi"] -bg_color = Color(0.146349, 0.723509, 0, 1) +bg_color = Color(0.804743, 0.804743, 0.804743, 1) [node name="LoadingScreen" type="Control"] layout_mode = 3 @@ -17,20 +17,33 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_5uxhf") -[node name="PanelContainer" type="PanelContainer" parent="."] +[node name="TextureRect" type="TextureRect" parent="."] +texture_filter = 2 layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +texture = ExtResource("2_xfkmi") -[node name="CenterContainer" type="CenterContainer" parent="PanelContainer"] -layout_mode = 2 +[node name="ReferenceRect" type="ReferenceRect" parent="."] +layout_mode = 0 +offset_left = 568.0 +offset_top = 956.0 +offset_right = 1368.0 +offset_bottom = 981.0 +border_color = Color(1, 1, 1, 1) +editor_only = false -[node name="ProgressBar" type="ProgressBar" parent="PanelContainer/CenterContainer"] +[node name="ProgressBar" type="ProgressBar" parent="."] unique_name_in_owner = true -custom_minimum_size = Vector2(500, 50) +custom_minimum_size = Vector2(800, 25) layout_mode = 2 -theme_override_styles/background = SubResource("StyleBoxFlat_5uxhf") +offset_left = 568.0 +offset_top = 956.0 +offset_right = 1368.0 +offset_bottom = 981.0 +theme_override_styles/background = SubResource("StyleBoxTexture_xfkmi") theme_override_styles/fill = SubResource("StyleBoxFlat_xfkmi") +show_percentage = false diff --git a/Zennysoft.Game.Ma/src/options/OptionsMenu.tscn b/Zennysoft.Game.Ma/src/options/OptionsMenu.tscn index 28e1896d..10f23bf1 100644 --- a/Zennysoft.Game.Ma/src/options/OptionsMenu.tscn +++ b/Zennysoft.Game.Ma/src/options/OptionsMenu.tscn @@ -6,11 +6,11 @@ [ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="2_n0yw3"] [ext_resource type="LabelSettings" uid="uid://cuuo43x72xcsc" path="res://src/ui/label_settings/MainTextBold.tres" id="2_o7aaw"] [ext_resource type="FontFile" uid="uid://cke424xtk2s0o" path="res://src/ui/fonts/ebrima.ttf" id="2_ohii5"] -[ext_resource type="LabelSettings" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="5_1mx8s"] +[ext_resource type="LabelSettings" uid="uid://b6f8ggy3ulonb" path="res://src/ui/label_settings/GeorgiaItalic.tres" id="5_1mx8s"] [ext_resource type="Texture2D" uid="uid://u255bg4nytuf" path="res://src/ui/gallery/checkbox.png" id="5_wn77p"] [ext_resource type="Texture2D" uid="uid://2fwkphkxib7p" path="res://src/ui/gallery/Unchecked.png" id="6_ko1q6"] -[ext_resource type="StyleBox" path="res://src/options/SelectedOptionsBox.tres" id="9_lx8gn"] -[ext_resource type="StyleBox" path="res://src/options/UnselectedOptionsBox.tres" id="10_qvpxc"] +[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="9_lx8gn"] +[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="10_qvpxc"] [ext_resource type="Script" uid="uid://c6lw5yp8p0wb5" path="res://src/options/InputMapper.cs" id="12_776se"] [ext_resource type="Script" uid="uid://b70br20xue678" path="res://src/options/KeyboardRemapButton.cs" id="13_rjjwr"] [ext_resource type="Script" uid="uid://bo7vk56h1lr07" path="res://src/options/JoypadRemapButton.cs" id="14_wsiwg"] diff --git a/Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.cs b/Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.cs similarity index 60% rename from Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.cs rename to Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.cs index ad5b0ac6..bd72ead1 100644 --- a/Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.cs +++ b/Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.cs @@ -2,24 +2,26 @@ using Chickensoft.AutoInject; using Chickensoft.GodotNodeInterfaces; using Chickensoft.Introspection; using Godot; +using System; namespace Zennysoft.Game.Ma; -public interface IDeathMenu : IControl +public interface IGameOverMenu : IControl { void FadeIn(); void FadeOut(); + + public event Action NewGame; + public event Action QuitGame; } [Meta(typeof(IAutoNode))] -public partial class DeathMenu : Control, IDeathMenu +public partial class GameOverMenu : Control, IGameOverMenu { public override void _Notification(int what) => this.Notify(what); - [Signal] - public delegate void NewGameEventHandler(); - [Signal] - public delegate void QuitGameEventHandler(); + public event Action NewGame; + public event Action QuitGame; [Dependency] Game Game => this.DependOn(); @@ -31,28 +33,28 @@ public partial class DeathMenu : Control, IDeathMenu public void OnReady() { - Continue.Pressed += Continue_Pressed; - Exit.Pressed += Exit_Pressed; - VisibilityChanged += DeathMenu_VisibilityChanged; + Continue.Pressed += Continue_Pressed; + Exit.Pressed += Exit_Pressed; + VisibilityChanged += DeathMenu_VisibilityChanged; } private void DeathMenu_VisibilityChanged() { - if (Visible) - Continue.CallDeferred(MethodName.GrabFocus, []); - else - ReleaseFocus(); + if (Visible) + Continue.CallDeferred(MethodName.GrabFocus, []); + else + ReleaseFocus(); } private void Exit_Pressed() { - EmitSignal(SignalName.QuitGame); + QuitGame?.Invoke(); } private void Continue_Pressed() { - FadeOut(); - EmitSignal(SignalName.NewGame); + FadeOut(); + NewGame?.Invoke(); } public void FadeIn() => AnimationPlayer.Play("fade_in"); diff --git a/Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.cs.uid b/Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.cs.uid similarity index 100% rename from Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.cs.uid rename to Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.cs.uid diff --git a/Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.tscn b/Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.tscn similarity index 55% rename from Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.tscn rename to Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.tscn index 2d209c7f..a0561beb 100644 --- a/Zennysoft.Game.Ma/src/ui/death_menu/DeathMenu.tscn +++ b/Zennysoft.Game.Ma/src/ui/game_over/GameOverMenu.tscn @@ -1,7 +1,10 @@ -[gd_scene load_steps=7 format=3 uid="uid://dbtfgrtgpr4qg"] +[gd_scene load_steps=10 format=3 uid="uid://dbtfgrtgpr4qg"] -[ext_resource type="Script" uid="uid://caqsfstq2l0lq" path="res://src/ui/death_menu/DeathMenu.cs" id="1_megey"] -[ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="2_ip5p6"] +[ext_resource type="Script" uid="uid://caqsfstq2l0lq" path="res://src/ui/game_over/GameOverMenu.cs" id="1_megey"] +[ext_resource type="Texture2D" uid="uid://dif6p5hc6b5mq" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Gameover_720_16_9.png" id="2_yb3dv"] +[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="3_n738q"] +[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="3_yb3dv"] +[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="4_byrtd"] [sub_resource type="Animation" id="Animation_qmlrq"] length = 0.001 @@ -93,7 +96,7 @@ _data = { &"fade_out": SubResource("Animation_6ji3u") } -[node name="DeathMenu" type="Control"] +[node name="GameOver" type="Control"] process_mode = 3 layout_mode = 3 anchors_preset = 15 @@ -103,14 +106,15 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_megey") -[node name="ColorRect" type="ColorRect" parent="."] +[node name="BG" type="TextureRect" parent="."] +texture_filter = 2 layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -color = Color(0.137255, 0.121569, 0.12549, 1) +texture = ExtResource("2_yb3dv") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] unique_name_in_owner = true @@ -118,26 +122,15 @@ libraries = { &"": SubResource("AnimationLibrary_ek7oy") } -[node name="CenterContainer" type="CenterContainer" parent="."] -layout_mode = 1 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] +[node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 2 +offset_left = 232.0 +offset_top = 735.905 +offset_right = 386.0 +offset_bottom = 837.905 +theme_override_constants/separation = 10 -[node name="GameOverPlaceholder" type="Label" parent="CenterContainer/VBoxContainer"] -layout_mode = 2 -theme_override_colors/font_color = Color(0.545098, 0, 0, 1) -theme_override_constants/outline_size = 12 -theme_override_fonts/font = ExtResource("2_ip5p6") -theme_override_font_sizes/font_size = 72 -text = "Game Over" - -[node name="Continue" type="Button" parent="CenterContainer/VBoxContainer"] +[node name="Continue" type="Button" parent="VBoxContainer"] unique_name_in_owner = true process_mode = 3 layout_mode = 2 @@ -145,14 +138,41 @@ focus_neighbor_top = NodePath(".") focus_neighbor_bottom = NodePath("../Exit") focus_next = NodePath("../Exit") focus_previous = NodePath(".") +theme_override_fonts/font = ExtResource("3_n738q") +theme_override_font_sizes/font_size = 38 +theme_override_styles/focus = ExtResource("3_yb3dv") +theme_override_styles/disabled_mirrored = ExtResource("4_byrtd") +theme_override_styles/disabled = ExtResource("4_byrtd") +theme_override_styles/hover_pressed_mirrored = ExtResource("4_byrtd") +theme_override_styles/hover_pressed = ExtResource("4_byrtd") +theme_override_styles/hover_mirrored = ExtResource("4_byrtd") +theme_override_styles/hover = ExtResource("4_byrtd") +theme_override_styles/pressed_mirrored = ExtResource("4_byrtd") +theme_override_styles/pressed = ExtResource("4_byrtd") +theme_override_styles/normal_mirrored = ExtResource("4_byrtd") +theme_override_styles/normal = ExtResource("4_byrtd") text = "Continue" -[node name="Exit" type="Button" parent="CenterContainer/VBoxContainer"] +[node name="Exit" type="Button" parent="VBoxContainer"] unique_name_in_owner = true process_mode = 3 layout_mode = 2 +size_flags_horizontal = 4 focus_neighbor_top = NodePath("../Continue") focus_neighbor_bottom = NodePath(".") focus_next = NodePath(".") focus_previous = NodePath("../Continue") +theme_override_fonts/font = ExtResource("3_n738q") +theme_override_font_sizes/font_size = 38 +theme_override_styles/focus = ExtResource("3_yb3dv") +theme_override_styles/disabled_mirrored = ExtResource("4_byrtd") +theme_override_styles/disabled = ExtResource("4_byrtd") +theme_override_styles/hover_pressed_mirrored = ExtResource("4_byrtd") +theme_override_styles/hover_pressed = ExtResource("4_byrtd") +theme_override_styles/hover_mirrored = ExtResource("4_byrtd") +theme_override_styles/hover = ExtResource("4_byrtd") +theme_override_styles/pressed_mirrored = ExtResource("4_byrtd") +theme_override_styles/pressed = ExtResource("4_byrtd") +theme_override_styles/normal_mirrored = ExtResource("4_byrtd") +theme_override_styles/normal = ExtResource("4_byrtd") text = "Exit" 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 d5077aa8..c848e9bb 100644 --- a/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.tscn +++ b/Zennysoft.Game.Ma/src/ui/in_game_ui/InGameUI.tscn @@ -57,17 +57,8 @@ layout_mode = 2 [node name="CenterContainer" type="CenterContainer" parent="HBoxContainer/SubViewportContainer/SubViewport"] custom_minimum_size = Vector2(1440, 1080) -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="InventoryMenu" parent="HBoxContainer/SubViewportContainer/SubViewport/CenterContainer" instance=ExtResource("3_4vcdl")] -unique_name_in_owner = true -process_mode = 3 -visible = false -layout_mode = 2 +offset_right = 1440.0 +offset_bottom = 1080.0 [node name="UseTeleportPrompt" parent="HBoxContainer/SubViewportContainer/SubViewport/CenterContainer" instance=ExtResource("5_h1hgq")] unique_name_in_owner = true @@ -151,3 +142,8 @@ offset_top = 813.0 offset_right = 267.0 offset_bottom = 1004.0 size_flags_vertical = 3 + +[node name="InventoryMenu" parent="." instance=ExtResource("3_4vcdl")] +unique_name_in_owner = true +process_mode = 3 +layout_mode = 1 diff --git a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs index beb253f9..f45ed742 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.cs @@ -28,9 +28,6 @@ public partial class InventoryMenu : Control, IInventoryMenu [Node] public Label UseItemPrompt { get; set; } [Node] public Label ItemEffectLabel { get; set; } - [Node] public Label BackArrow { get; set; } = default!; - [Node] public Label ForwardArrow { get; set; } = default!; - [Node] public ItemSlot ItemSlot1 { get; set; } [Node] public ItemSlot ItemSlot2 { get; set; } [Node] public ItemSlot ItemSlot3 { get; set; } @@ -41,6 +38,16 @@ public partial class InventoryMenu : Control, IInventoryMenu [Node] public ItemSlot ItemSlot8 { get; set; } [Node] public ItemSlot ItemSlot9 { get; set; } [Node] public ItemSlot ItemSlot10 { get; set; } + [Node] public ItemSlot ItemSlot11 { get; set; } + [Node] public ItemSlot ItemSlot12 { get; set; } + [Node] public ItemSlot ItemSlot13 { get; set; } + [Node] public ItemSlot ItemSlot14 { get; set; } + [Node] public ItemSlot ItemSlot15 { get; set; } + [Node] public ItemSlot ItemSlot16 { get; set; } + [Node] public ItemSlot ItemSlot17 { get; set; } + [Node] public ItemSlot ItemSlot18 { get; set; } + [Node] public ItemSlot ItemSlot19 { get; set; } + [Node] public ItemSlot ItemSlot20 { get; set; } [Dependency] private IPlayer _player => this.DependOn(); [Dependency] private IGame _game => this.DependOn(); @@ -48,13 +55,10 @@ public partial class InventoryMenu : Control, IInventoryMenu private List ItemSlots; - private InventoryPageNumber _currentPageNumber = InventoryPageNumber.FirstPage; - private string ITEM_SLOT_SCENE = "res://src/ui/inventory_menu/ItemSlot.tscn"; - private const int _itemsPerPage = 10; - private IItemSlot _currentlySelectedItem = null; + private bool _enableMenuSound = false; public override void _EnterTree() { @@ -63,7 +67,7 @@ public partial class InventoryMenu : Control, IInventoryMenu public void OnResolved() { - ItemSlots = [ItemSlot1, ItemSlot2, ItemSlot3, ItemSlot4, ItemSlot5, ItemSlot6, ItemSlot7, ItemSlot8, ItemSlot9, ItemSlot10]; + ItemSlots = [ItemSlot1, ItemSlot2, ItemSlot3, ItemSlot4, ItemSlot5, ItemSlot6, ItemSlot7, ItemSlot8, ItemSlot9, ItemSlot10, ItemSlot11, ItemSlot12, ItemSlot13, ItemSlot14, ItemSlot15, ItemSlot16, ItemSlot17, ItemSlot18, ItemSlot19, ItemSlot20]; _currentlySelectedItem = ItemSlot1; foreach (var item in ItemSlots) { @@ -83,9 +87,19 @@ public partial class InventoryMenu : Control, IInventoryMenu ThrowButton.Pressed += ThrowButtonPressed; DropButton.Pressed += DropButtonPressed; + UseButton.FocusEntered += ActionButtonFocusChanged; + ThrowButton.FocusEntered += ActionButtonFocusChanged; + DropButton.FocusEntered += ActionButtonFocusChanged; + VisibilityChanged += InventoryMenu_VisibilityChanged; } + private void ActionButtonFocusChanged() + { + if (!_enableMenuSound) + SfxDatabase.Instance.Play(SoundEffect.MoveUI); + } + public override void _Input(InputEvent @event) { if (!Visible) @@ -94,18 +108,6 @@ public partial class InventoryMenu : Control, IInventoryMenu if ((!Input.IsActionJustPressed(GameInputs.UiUp) && Input.IsActionPressed(GameInputs.UiUp)) || (!Input.IsActionJustPressed(GameInputs.UiDown) && Input.IsActionPressed(GameInputs.UiDown))) AcceptEvent(); - if (Input.IsActionJustPressed(GameInputs.UiUp) && _currentlySelectedItem.GetIndex() != ItemSlots.First().GetIndex() && !(UseButton.HasFocus() || DropButton.HasFocus() || ThrowButton.HasFocus())) - SfxDatabase.Instance.Play(SoundEffect.MoveUI); - if (Input.IsActionJustPressed(GameInputs.UiDown) && _currentlySelectedItem.GetIndex() != ItemSlots.Last(x => x.Visible).GetIndex() && !(UseButton.HasFocus() || DropButton.HasFocus() || ThrowButton.HasFocus())) - SfxDatabase.Instance.Play(SoundEffect.MoveUI); - - if (Input.IsActionJustPressed(GameInputs.UiUp) && (DropButton.HasFocus() || ThrowButton.HasFocus())) - SfxDatabase.Instance.Play(SoundEffect.MoveUI); - if (Input.IsActionJustPressed(GameInputs.UiDown) && (UseButton.HasFocus() || ThrowButton.HasFocus())) - SfxDatabase.Instance.Play(SoundEffect.MoveUI); - - - if (Input.IsActionJustPressed(GameInputs.Inventory) && !(UseButton.HasFocus() || DropButton.HasFocus() || ThrowButton.HasFocus())) { SfxDatabase.Instance.Play(SoundEffect.CancelUI); @@ -124,22 +126,6 @@ public partial class InventoryMenu : Control, IInventoryMenu AcceptEvent(); _gameRepo.CloseInventory(); } - if (_currentPageNumber == InventoryPageNumber.FirstPage && _player.Inventory.Items.Count > 10 && Input.IsActionJustPressed(GameInputs.MoveRight)) - { - SfxDatabase.Instance.Play(SoundEffect.MoveUI); - _currentPageNumber = InventoryPageNumber.SecondPage; - Inventory_InventoryChanged(); - _currentlySelectedItem = ItemSlot1; - ItemSlot1.GrabFocus(); - } - else if (_currentPageNumber == InventoryPageNumber.SecondPage && Input.IsActionJustPressed(GameInputs.MoveLeft)) - { - SfxDatabase.Instance.Play(SoundEffect.MoveUI); - _currentPageNumber = InventoryPageNumber.FirstPage; - Inventory_InventoryChanged(); - _currentlySelectedItem = ItemSlot1; - ItemSlot1.GrabFocus(); - } if (Input.IsActionJustPressed(GameInputs.InventorySort)) { @@ -163,6 +149,11 @@ public partial class InventoryMenu : Control, IInventoryMenu { SfxDatabase.Instance.Play(SoundEffect.OpenInventory); _currentlySelectedItem.GrabFocus(); + _enableMenuSound = true; + } + else + { + _enableMenuSound = false; } } @@ -179,6 +170,9 @@ public partial class InventoryMenu : Control, IInventoryMenu if (itemSlot.Item.Value == null) return; + if (_enableMenuSound) + SfxDatabase.Instance.Play(SoundEffect.MoveUI); + ItemDescriptionTitle.Text = $"{itemSlot.Item.Value.ItemName}"; ItemEffectLabel.Text = $"{itemSlot.Item.Value.Description}"; _currentlySelectedItem = itemSlot; @@ -197,28 +191,13 @@ public partial class InventoryMenu : Control, IInventoryMenu slot.SetItemStyle(); } - if (_currentPageNumber == InventoryPageNumber.SecondPage && _player.Inventory.Items.Count <= 10) - { - _currentPageNumber = InventoryPageNumber.FirstPage; - var elementToSelect = _player.Inventory.Items.IndexOf(_player.Inventory.Items.Last()); - _currentlySelectedItem = ItemSlots.ElementAt(elementToSelect); - _currentlySelectedItem.GrabFocus(); - } - - var itemsToDisplay = new List(); - if (_currentPageNumber == InventoryPageNumber.FirstPage) - itemsToDisplay = [.. _player.Inventory.Items.Take(_itemsPerPage)]; - else - itemsToDisplay = [.. _player.Inventory.Items.TakeLast(_player.Inventory.Items.Count - _itemsPerPage)]; - + var itemsToDisplay = _player.Inventory.Items; for (var i = 0; i < itemsToDisplay.Count; i++) { ItemSlots[i].Item.OnNext(itemsToDisplay[i]); ItemSlots[i].Visible = true; } - SetPageIndicators(); - if (!_player.Inventory.Items.Contains(_currentlySelectedItem.Item.Value)) { _currentlySelectedItem.Item.OnNext(null); @@ -228,20 +207,6 @@ public partial class InventoryMenu : Control, IInventoryMenu } } - private void SetPageIndicators() - { - if (_player.Inventory.Items.Count > 10 && _currentPageNumber == InventoryPageNumber.FirstPage) - { - ForwardArrow.Text = "►"; - BackArrow.Text = ""; - } - else if (_player.Inventory.Items.Count > 10 && _currentPageNumber == InventoryPageNumber.SecondPage) - { - ForwardArrow.Text = ""; - BackArrow.Text = "◄"; - } - } - private void Attack_Sync(int obj) => ATKValue.Text = $"{_player.AttackComponent.CurrentAttack.Value}/{_player.AttackComponent.MaximumAttack.Value}"; private void Defense_Sync(int obj) => DEFValue.Text = $"{_player.DefenseComponent.CurrentDefense.Value}/{_player.DefenseComponent.MaximumDefense.Value}"; @@ -308,7 +273,8 @@ public partial class InventoryMenu : Control, IInventoryMenu UseButton.Text = "Use"; } - UseButton.CallDeferred(MethodName.GrabFocus); + UseButton.GrabFocus(); + _enableMenuSound = false; } private void HideUserActionPrompt() @@ -321,6 +287,7 @@ public partial class InventoryMenu : Control, IInventoryMenu ThrowButton.ReleaseFocus(); DropButton.ReleaseFocus(); _currentlySelectedItem.GrabFocus(); + _enableMenuSound = true; } private async Task EquipOrUnequipItem(EquipableItem equipable) diff --git a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.tscn b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.tscn index 88bfdd20..f4cce178 100644 --- a/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.tscn +++ b/Zennysoft.Game.Ma/src/ui/inventory_menu/InventoryMenu.tscn @@ -1,7 +1,6 @@ [gd_scene load_steps=21 format=3 uid="uid://dlj8qdg1c5048"] [ext_resource type="Script" uid="uid://bi1xopts68paw" path="res://src/ui/inventory_menu/InventoryMenu.cs" id="1_b6rkr"] -[ext_resource type="Shader" uid="uid://cnphwvmr05hp1" path="res://src/ui/inventory_menu/InventoryMenu.gdshader" id="2_0fvsh"] [ext_resource type="PackedScene" uid="uid://c005nd0m2eim" path="res://src/ui/inventory_menu/ItemSlot.tscn" id="4_aiji3"] [ext_resource type="LabelSettings" uid="uid://wc363u5t1yi2" path="res://src/ui/label_settings/HeadingFont.tres" id="4_l0byb"] [ext_resource type="LabelSettings" uid="uid://cuuo43x72xcsc" path="res://src/ui/label_settings/MainTextBold.tres" id="7_vyrxm"] @@ -9,22 +8,8 @@ [ext_resource type="Theme" uid="uid://daxuhpmyxwxck" path="res://src/ui/inventory_menu/InventoryDialogueSelectionStyle.tres" id="8_khyvo"] [ext_resource type="LabelSettings" uid="uid://bgnwcs434ppkf" path="res://src/ui/label_settings/EbrimaText.tres" id="8_ldqki"] -[sub_resource type="ShaderMaterial" id="ShaderMaterial_i55tv"] -shader = ExtResource("2_0fvsh") -shader_parameter/color1 = Vector3(-1.635, -0.665, 0.005) -shader_parameter/color2 = Vector3(-0.275, 0.91, 1.005) -shader_parameter/color3 = Vector3(1, 1, 1) -shader_parameter/color4 = Vector3(0, 0.1, 0.2) -shader_parameter/grandient = 0.01 -shader_parameter/zoom = 2.0 -shader_parameter/disp = Vector2(0, 0) -shader_parameter/rot_angle = Vector2(1, 1) -shader_parameter/wiggle = 0.35 -shader_parameter/speed1 = 0.1 -shader_parameter/speed2 = 0.1 -shader_parameter/speed3 = 0.1 - -[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_3ynpe"] +[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_unikd"] +blend_mode = 4 [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_0kb6l"] @@ -46,19 +31,27 @@ shader_parameter/speed3 = 0.1 [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ct6ql"] +[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_7co7g"] +blend_mode = 4 +light_mode = 2 + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_unikd"] + [node name="InventoryMenu" type="Control"] -custom_minimum_size = Vector2(1440, 1080) +visible = false layout_mode = 3 -anchors_preset = 0 -offset_right = 1440.0 -offset_bottom = 1080.0 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 mouse_filter = 2 script = ExtResource("1_b6rkr") -[node name="BG" type="TextureRect" parent="."] -material = SubResource("ShaderMaterial_i55tv") +[node name="BG" type="ColorRect" parent="."] +material = SubResource("CanvasItemMaterial_unikd") layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -66,14 +59,14 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 2 -texture = SubResource("PlaceholderTexture2D_3ynpe") -expand_mode = 2 +color = Color(0.215686, 0.215686, 0.215686, 0.431373) [node name="InventoryInfo" type="MarginContainer" parent="."] -custom_minimum_size = Vector2(1440, 1080) layout_mode = 0 -offset_right = 1359.0 -offset_bottom = 958.0 +offset_left = -157.0 +offset_top = -67.0 +offset_right = 1028.0 +offset_bottom = 1013.0 theme_override_constants/margin_top = 100 [node name="HBoxContainer" type="HBoxContainer" parent="InventoryInfo"] @@ -92,12 +85,6 @@ size_flags_horizontal = 4 [node name="HBoxContainer" type="HBoxContainer" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemTitleContainer"] layout_mode = 2 -[node name="BackArrow" type="Label" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemTitleContainer/HBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 -text = "◄" -label_settings = ExtResource("8_ldqki") - [node name="ItemsTitle" type="Label" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemTitleContainer/HBoxContainer"] custom_minimum_size = Vector2(300, 0) layout_mode = 2 @@ -107,76 +94,6 @@ text = " ITEMS" label_settings = ExtResource("4_l0byb") vertical_alignment = 1 -[node name="ForwardArrow" type="Label" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemTitleContainer/HBoxContainer"] -unique_name_in_owner = true -layout_mode = 2 -size_flags_horizontal = 3 -size_flags_vertical = 1 -text = "►" -label_settings = ExtResource("8_ldqki") -horizontal_alignment = 1 -vertical_alignment = 1 - -[node name="ItemsPage" type="VBoxContainer" parent="InventoryInfo/HBoxContainer/ItemInfo"] -unique_name_in_owner = true -layout_mode = 2 -theme_override_constants/separation = 15 -alignment = 1 - -[node name="ReferenceRect3" type="ReferenceRect" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage"] -custom_minimum_size = Vector2(0, 14) -layout_mode = 2 - -[node name="ItemSlot1" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot2" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot3" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot4" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot5" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot6" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot7" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot8" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot9" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - -[node name="ItemSlot10" parent="InventoryInfo/HBoxContainer/ItemInfo/ItemsPage" instance=ExtResource("4_aiji3")] -unique_name_in_owner = true -visible = false -layout_mode = 2 - [node name="PlayerInfo" type="VBoxContainer" parent="InventoryInfo/HBoxContainer"] layout_mode = 2 mouse_filter = 2 @@ -364,3 +281,129 @@ theme_override_styles/normal = SubResource("StyleBoxEmpty_ct6ql") button_mask = 0 text = "Drop" alignment = 0 + +[node name="Panel" type="Panel" parent="."] +material = SubResource("CanvasItemMaterial_7co7g") +layout_mode = 0 +offset_left = 1069.0 +offset_top = 23.0 +offset_right = 1885.0 +offset_bottom = 1015.0 + +[node name="ScrollContainer" type="ScrollContainer" parent="Panel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxEmpty_unikd") +follow_focus = true +draw_focus_border = true + +[node name="ItemsPage" type="VBoxContainer" parent="Panel/ScrollContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 2 +alignment = 1 + +[node name="ItemSlot1" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot2" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot3" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot4" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot5" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot6" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot7" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot8" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot9" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot10" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot11" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot12" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot13" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot14" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot15" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot16" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot17" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot18" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot19" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 + +[node name="ItemSlot20" parent="Panel/ScrollContainer/ItemsPage" instance=ExtResource("4_aiji3")] +unique_name_in_owner = true +visible = false +layout_mode = 2 diff --git a/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.tscn b/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.tscn index 5c7e48f3..2e6b5329 100644 --- a/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.tscn +++ b/Zennysoft.Game.Ma/src/ui/load_next_level/LoadNextLevel.tscn @@ -8,10 +8,10 @@ [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1tca4"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1pd8j"] - [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_crnka"] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1pd8j"] + [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yoep7"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_svmjr"] @@ -149,10 +149,13 @@ theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_fonts/font = ExtResource("3_n7di7") theme_override_font_sizes/font_size = 50 theme_override_styles/focus = SubResource("StyleBoxEmpty_1tca4") +theme_override_styles/disabled = SubResource("StyleBoxEmpty_crnka") +theme_override_styles/hover = SubResource("StyleBoxEmpty_crnka") theme_override_styles/pressed = SubResource("StyleBoxEmpty_1pd8j") theme_override_styles/normal = SubResource("StyleBoxEmpty_crnka") button_mask = 0 text = "CONTINUE" +flat = true [node name="ExitButton" type="Button" parent="MarginContainer/VBoxContainer"] unique_name_in_owner = true @@ -166,10 +169,19 @@ theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_fonts/font = ExtResource("3_n7di7") theme_override_font_sizes/font_size = 50 theme_override_styles/focus = SubResource("StyleBoxEmpty_yoep7") +theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_yoep7") +theme_override_styles/disabled = SubResource("StyleBoxEmpty_yoep7") +theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_yoep7") +theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_yoep7") +theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_yoep7") +theme_override_styles/hover = SubResource("StyleBoxEmpty_svmjr") +theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/pressed = SubResource("StyleBoxEmpty_svmjr") +theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/normal = SubResource("StyleBoxEmpty_cmr8o") button_mask = 0 text = "EXIT TOWER" +flat = true [node name="PlayerStats" type="VBoxContainer" parent="MarginContainer/VBoxContainer"] layout_mode = 2 diff --git a/Zennysoft.Game.Ma/src/ui/teleport_prompt/UseTeleportPrompt.tscn b/Zennysoft.Game.Ma/src/ui/teleport_prompt/UseTeleportPrompt.tscn index 1f262538..00d8f5eb 100644 --- a/Zennysoft.Game.Ma/src/ui/teleport_prompt/UseTeleportPrompt.tscn +++ b/Zennysoft.Game.Ma/src/ui/teleport_prompt/UseTeleportPrompt.tscn @@ -1,29 +1,21 @@ -[gd_scene load_steps=16 format=3 uid="uid://bea2waybmgd6u"] +[gd_scene load_steps=13 format=3 uid="uid://bea2waybmgd6u"] [ext_resource type="Script" uid="uid://dvn7g207w5jaj" path="res://src/ui/in_game_ui/UseTeleportPrompt.cs" id="1_x3wkp"] [ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="2_i6kb2"] [ext_resource type="FontFile" uid="uid://duu4matpexcq4" path="res://src/ui/fonts/LSANS.TTF" id="3_tygw6"] +[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_43cjp"] +[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="5_sytxg"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ahhj2"] [sub_resource type="LabelSettings" id="LabelSettings_3g0y1"] font = ExtResource("3_tygw6") -font_size = 60 +font_size = 48 outline_size = 2 outline_color = Color(0, 0, 0, 1) -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1tca4"] - [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1pd8j"] -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_crnka"] - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_yoep7"] - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_svmjr"] - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cmr8o"] - [sub_resource type="Animation" id="Animation_xrfau"] length = 0.001 tracks/0/type = "value" @@ -147,8 +139,9 @@ label_settings = SubResource("LabelSettings_3g0y1") [node name="YesButton" type="Button" parent="CenterContainer/VBoxContainer"] unique_name_in_owner = true -custom_minimum_size = Vector2(100, 0) layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 focus_neighbor_left = NodePath(".") focus_neighbor_top = NodePath(".") focus_neighbor_right = NodePath(".") @@ -157,15 +150,25 @@ 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_fonts/font = ExtResource("3_tygw6") theme_override_font_sizes/font_size = 50 -theme_override_styles/focus = SubResource("StyleBoxEmpty_1tca4") -theme_override_styles/pressed = SubResource("StyleBoxEmpty_1pd8j") -theme_override_styles/normal = SubResource("StyleBoxEmpty_crnka") +theme_override_styles/focus = ExtResource("4_43cjp") +theme_override_styles/disabled_mirrored = ExtResource("5_sytxg") +theme_override_styles/disabled = SubResource("StyleBoxEmpty_1pd8j") +theme_override_styles/hover_pressed_mirrored = ExtResource("5_sytxg") +theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_1pd8j") +theme_override_styles/hover_mirrored = ExtResource("5_sytxg") +theme_override_styles/hover = SubResource("StyleBoxEmpty_1pd8j") +theme_override_styles/pressed_mirrored = ExtResource("5_sytxg") +theme_override_styles/pressed = ExtResource("5_sytxg") +theme_override_styles/normal_mirrored = ExtResource("5_sytxg") +theme_override_styles/normal = ExtResource("5_sytxg") button_mask = 0 text = "Yes" [node name="NoButton" type="Button" parent="CenterContainer/VBoxContainer"] unique_name_in_owner = true layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 4 focus_neighbor_left = NodePath(".") focus_neighbor_top = NodePath("../YesButton") focus_neighbor_right = NodePath(".") @@ -174,9 +177,14 @@ 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_fonts/font = ExtResource("3_tygw6") theme_override_font_sizes/font_size = 50 -theme_override_styles/focus = SubResource("StyleBoxEmpty_yoep7") -theme_override_styles/pressed = SubResource("StyleBoxEmpty_svmjr") -theme_override_styles/normal = SubResource("StyleBoxEmpty_cmr8o") +theme_override_styles/focus = ExtResource("4_43cjp") +theme_override_styles/disabled_mirrored = ExtResource("5_sytxg") +theme_override_styles/hover_pressed_mirrored = ExtResource("5_sytxg") +theme_override_styles/hover_mirrored = ExtResource("5_sytxg") +theme_override_styles/pressed_mirrored = ExtResource("5_sytxg") +theme_override_styles/pressed = ExtResource("5_sytxg") +theme_override_styles/normal_mirrored = ExtResource("5_sytxg") +theme_override_styles/normal = ExtResource("5_sytxg") button_mask = 0 text = "No" diff --git a/Zennysoft.Game.Ma/src/utils/SceneLoader.cs b/Zennysoft.Game.Ma/src/utils/SceneLoader.cs index 25444257..bd61011b 100644 --- a/Zennysoft.Game.Ma/src/utils/SceneLoader.cs +++ b/Zennysoft.Game.Ma/src/utils/SceneLoader.cs @@ -1,4 +1,5 @@ using Godot; +using System; using System.Linq; namespace Zennysoft.Game.Ma; @@ -11,6 +12,9 @@ public partial class SceneLoader : Node [Signal] public delegate void SceneLoadedEventHandler(); + [Signal] + public delegate void SceneReportedProgressEventHandler(double progress); + public Node LoadedScene { get; private set; } public void LoadSceneRequest(string sceneToLoad) @@ -36,6 +40,7 @@ public partial class SceneLoader : Node var progress = new Godot.Collections.Array(); ResourceLoader.LoadThreadedGetStatus(_sceneToLoad, progress); + EmitSignal(SignalName.SceneReportedProgress, progress.Single()); if ((double)progress.Single() == 1) LoadScene(); } diff --git a/Zennysoft.Game.Ma/src/vfx/VisualShaderTest.tres b/Zennysoft.Game.Ma/src/vfx/VisualShaderTest.tres index 75818737..8ac2513c 100644 --- a/Zennysoft.Game.Ma/src/vfx/VisualShaderTest.tres +++ b/Zennysoft.Game.Ma/src/vfx/VisualShaderTest.tres @@ -1,4 +1,4 @@ -[gd_resource type="VisualShader" format=3 uid="uid://ce7t1f7ywglsb"] +[gd_resource type="VisualShader" load_steps=0 format=3 uid="uid://ce7t1f7ywglsb"] [resource] code = "shader_type canvas_item;