Loading screen fixes, transition screen UI fixes

This commit is contained in:
2026-02-03 01:47:42 -08:00
parent 51010c4f7d
commit 34dce8c5a2
14 changed files with 335 additions and 256 deletions

View File

@@ -55,144 +55,142 @@ public partial class App : Node, IApp
public void Initialize() public void Initialize()
{ {
_container = new SimpleInjector.Container(); _container = new SimpleInjector.Container();
_container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle(); _container.Options.DefaultScopedLifestyle = new AsyncScopedLifestyle();
_container.RegisterSingleton<IAppRepo, AppRepo>(); _container.RegisterSingleton<IAppRepo, AppRepo>();
_container.RegisterSingleton<IAppLogic, AppLogic>(); _container.RegisterSingleton<IAppLogic, AppLogic>();
_container.RegisterSingleton<IFileSystem, FileSystem>(); _container.RegisterSingleton<IFileSystem, FileSystem>();
_container.RegisterSingleton<ISaveFileManager, SaveFileManager>(); _container.RegisterSingleton<ISaveFileManager, SaveFileManager>();
_saveFileManager = _container.GetInstance<ISaveFileManager>(); _saveFileManager = _container.GetInstance<ISaveFileManager>();
_optionsSavePath = $"{OS.GetUserDataDir()}/options.json"; _optionsSavePath = $"{OS.GetUserDataDir()}/options.json";
_controllerSavePath = $"{OS.GetUserDataDir()}/controls.json"; _controllerSavePath = $"{OS.GetUserDataDir()}/controls.json";
MainMenu.StartGame += OnStartGame; MainMenu.StartGame += OnStartGame;
MainMenu.EnemyViewer += OnEnemyViewer; MainMenu.EnemyViewer += OnEnemyViewer;
MainMenu.Gallery += OnGallery; MainMenu.Gallery += OnGallery;
MainMenu.Options += OnOptions; MainMenu.Options += OnOptions;
MainMenu.Quit += OnQuit; MainMenu.Quit += OnQuit;
GalleryMenu.GalleryExited += GalleryExited; GalleryMenu.GalleryExited += GalleryExited;
OptionsMenu.OptionsMenuExited += OptionsMenu_OptionsMenuExited; OptionsMenu.OptionsMenuExited += OptionsMenu_OptionsMenuExited;
OptionsMenu.DeleteSaveData += DeleteSaveData; OptionsMenu.DeleteSaveData += DeleteSaveData;
AppRepo = _container.GetInstance<IAppRepo>(); AppRepo = _container.GetInstance<IAppRepo>();
AppLogic = _container.GetInstance<IAppLogic>(); AppLogic = _container.GetInstance<IAppLogic>();
Task.Run(() => _saveFileManager.ReadFromFile<string>(_controllerSavePath).ContinueWith((data) => Task.Run(() => _saveFileManager.ReadFromFile<string>(_controllerSavePath).ContinueWith((data) =>
{ {
if (data.IsCompletedSuccessfully) if (data.IsCompletedSuccessfully)
OptionsMenu.Controller.CallDeferred(nameof(OptionsMenu.Controller.LoadControllerInput), data.Result); OptionsMenu.Controller.CallDeferred(nameof(OptionsMenu.Controller.LoadControllerInput), data.Result);
})); }));
AppLogic.Set(AppRepo); AppLogic.Set(AppRepo);
AppLogic.Set(new AppLogic.Data()); AppLogic.Set(new AppLogic.Data());
AppRepo.DataViewerExited += DataViewerExited; AppRepo.DataViewerExited += DataViewerExited;
Input.MouseMode = Input.MouseModeEnum.Visible; Input.MouseMode = Input.MouseModeEnum.Visible;
_progress = []; _progress = [];
this.Provide(); this.Provide();
} }
private void GameExitRequested() private void GameExitRequested()
{ {
AppLogic.Input(new AppLogic.Input.QuitGame()); AppLogic.Input(new AppLogic.Input.QuitGame());
} }
private void DeleteSaveData() private void DeleteSaveData()
{ {
var saveFileManager = _container.GetInstance<ISaveFileManager>(); var saveFileManager = _container.GetInstance<ISaveFileManager>();
saveFileManager.DeleteSaveData(); saveFileManager.DeleteSaveData();
} }
private void DataViewerExited() private void DataViewerExited()
{ {
AppLogic.Input(new AppLogic.Input.EnemyViewerExited()); AppLogic.Input(new AppLogic.Input.EnemyViewerExited());
} }
private async void OptionsMenu_OptionsMenuExited() private async void OptionsMenu_OptionsMenuExited()
{ {
var saveFileManager = _container.GetInstance<ISaveFileManager>(); var saveFileManager = _container.GetInstance<ISaveFileManager>();
await saveFileManager.WriteToFile(OptionsMenu.OptionsData, _optionsSavePath); await saveFileManager.WriteToFile(OptionsMenu.OptionsData, _optionsSavePath);
var controllerOutput = InputHelper.SerializeInputsForActions(); var controllerOutput = InputHelper.SerializeInputsForActions();
await saveFileManager.WriteToFile(controllerOutput, _controllerSavePath); await saveFileManager.WriteToFile(controllerOutput, _controllerSavePath);
OptionsMenu.Hide(); OptionsMenu.Hide();
MainMenu.OptionsButton.GrabFocus(); MainMenu.OptionsButton.GrabFocus();
} }
private void GalleryExited() private void GalleryExited()
{ {
GalleryMenu.Hide(); GalleryMenu.Hide();
MainMenu.GalleryButton.GrabFocus(); MainMenu.GalleryButton.GrabFocus();
} }
public void OnReady() public void OnReady()
{ {
AppBinding = AppLogic.Bind(); AppBinding = AppLogic.Bind();
AppBinding AppBinding
.Handle((in AppLogic.Output.Initialize _) => .Handle((in AppLogic.Output.Initialize _) =>
{ {
Task.Run(() => _saveFileManager.ReadFromFile<string>(_optionsSavePath).ContinueWith((data) => Task.Run(() => _saveFileManager.ReadFromFile<string>(_optionsSavePath).ContinueWith((data) =>
{ {
AppLogic.Input(new AppLogic.Input.SaveFileLoaded()); AppLogic.Input(new AppLogic.Input.SaveFileLoaded());
})); }));
}) })
.Handle((in AppLogic.Output.ShowSplashScreen _) => .Handle((in AppLogic.Output.ShowSplashScreen _) =>
{ {
AppLogic.Input(new AppLogic.Input.FadeOutFinished()); AppLogic.Input(new AppLogic.Input.FadeOutFinished());
}) })
.Handle((in AppLogic.Output.HideSplashScreen _) => .Handle((in AppLogic.Output.HideSplashScreen _) =>
{ {
}) })
.Handle((in AppLogic.Output.SetupGameScene _) => .Handle((in AppLogic.Output.SetupGameScene _) =>
{ {
LoadingScreen.Show(); LoadingScreen.Show();
LoadGame(GAME_SCENE_PATH); LoadGame(GAME_SCENE_PATH);
}) })
.Handle((in AppLogic.Output.ShowMainMenu _) => .Handle((in AppLogic.Output.ShowMainMenu _) =>
{ {
MainMenu.CallDeferred(MainMenu.MethodName.FadeIn); MainMenu.CallDeferred(MainMenu.MethodName.FadeIn);
}) })
.Handle((in AppLogic.Output.CloseGame _) => .Handle((in AppLogic.Output.CloseGame _) =>
{ {
LoadingScreen.Hide(); LoadingScreen.Hide();
_game.GameExitRequested -= GameExitRequested; _game.GameExitRequested -= GameExitRequested;
MainMenu.StartGameButton.GrabFocus(); MainMenu.StartGameButton.GrabFocus();
_game.CallDeferred(MethodName.QueueFree, []); _game.CallDeferred(MethodName.QueueFree, []);
GetTree().Paused = false; GetTree().Paused = false;
}) })
.Handle((in AppLogic.Output.StartLoadingSaveFile _) => .Handle((in AppLogic.Output.StartLoadingSaveFile _) =>
{ {
}) })
.Handle((in AppLogic.Output.EnemyViewerOpened _) => .Handle((in AppLogic.Output.EnemyViewerOpened _) =>
{ {
LoadingScreen.Show(); LoadingScreen.Show();
LoadEnemyViewer(ENEMY_VIEWER_PATH); MainMenu.Hide();
}) LoadEnemyViewer(ENEMY_VIEWER_PATH);
.Handle((in AppLogic.Output.EnemyViewerExited _) => })
{ .Handle((in AppLogic.Output.EnemyViewerExited _) =>
LoadingScreen.Hide(); {
if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer) LoadingScreen.Hide();
enemyViewer.CallDeferred(MethodName.QueueFree); if (_enemyViewer != null && _enemyViewer is DataViewer enemyViewer)
MainMenu.Show(); enemyViewer.CallDeferred(MethodName.QueueFree);
MainMenu.EnemyViewerButton.GrabFocus(); MainMenu.Show();
}) MainMenu.EnemyViewerButton.GrabFocus();
.Handle((in AppLogic.Output.ExitGame _) => })
{ .Handle((in AppLogic.Output.ExitGame _) =>
GetTree().Quit(); {
}); GetTree().Quit();
});
AppLogic.Start(); AppLogic.Start();
} }
public override void _Process(double delta) public override void _Process(double delta)
{ {
if (_reportedProgress < 1) LoadingScreen.ProgressBar.Value = Mathf.RoundToInt(Mathf.Lerp(LoadingScreen.ProgressBar.Value, _reportedProgress * 100, (float)delta * 2));
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()); public void OnStartGame() => AppLogic.Input(new AppLogic.Input.NewGame());
@@ -203,64 +201,68 @@ public partial class App : Node, IApp
private async void LoadGame(string sceneName) private async void LoadGame(string sceneName)
{ {
var scene = await LoadSceneInternal(sceneName); var scene = await LoadSceneInternal(sceneName);
_game = scene as IGame; _game = scene as IGame;
_game.GameExitRequested += GameExitRequested; _game.GameLoaded += OnGameLoaded;
await ToSignal(GetTree().CreateTimer(0.8f), "timeout"); _game.GameExitRequested += GameExitRequested;
CallDeferred(MethodName.AddChild, scene); await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
CallDeferred(MethodName.AddChild, scene);
} }
private void OnGameLoaded() => LoadingScreen.Hide();
private async void LoadEnemyViewer(string sceneName) private async void LoadEnemyViewer(string sceneName)
{ {
var scene = await LoadSceneInternal(sceneName); var scene = await LoadSceneInternal(sceneName);
_enemyViewer = scene as IDataViewer; _enemyViewer = scene as IDataViewer;
await ToSignal(GetTree().CreateTimer(0.8f), "timeout"); await ToSignal(GetTree().CreateTimer(0.8f), "timeout");
CallDeferred(MethodName.AddChild, scene); CallDeferred(MethodName.AddChild, scene);
LoadingScreen.Hide();
} }
private async Task<Node> LoadSceneInternal(string sceneName) private async Task<Node> LoadSceneInternal(string sceneName)
{ {
LoadingScreen.Show(); LoadingScreen.Show();
LoadingScreen.ProgressBar.Value = 0; LoadingScreen.ProgressBar.Value = 0;
var sceneLoader = new SceneLoader(); var sceneLoader = new SceneLoader();
CallDeferred(MethodName.AddChild, sceneLoader); CallDeferred(MethodName.AddChild, sceneLoader);
sceneLoader.LoadSceneRequest(sceneName); sceneLoader.LoadSceneRequest(sceneName);
sceneLoader.SceneReportedProgress += SceneLoader_SceneReportedProgress; sceneLoader.SceneReportedProgress += SceneLoader_SceneReportedProgress;
await ToSignal(sceneLoader, SceneLoader.SignalName.SceneLoaded); await ToSignal(sceneLoader, SceneLoader.SignalName.SceneLoaded);
var result = sceneLoader.LoadedScene; var result = sceneLoader.LoadedScene;
sceneLoader.QueueFree(); sceneLoader.QueueFree();
return result; return result;
} }
private void SceneLoader_SceneReportedProgress(double progress) => _reportedProgress = progress; private void SceneLoader_SceneReportedProgress(double progress) => _reportedProgress = progress;
private async void OnOptions() private async void OnOptions()
{ {
OptionsMenu.Show(); OptionsMenu.Show();
OptionsMenu.GameTab.GrabFocus(); OptionsMenu.GameTab.GrabFocus();
} }
private async void OnGallery() private async void OnGallery()
{ {
GalleryMenu.Show(); GalleryMenu.Show();
GalleryMenu.ItemButton1.GrabFocus(); GalleryMenu.ItemButton1.GrabFocus();
} }
public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame()); public void OnQuit() => AppLogic.Input(new AppLogic.Input.QuitGame());
public void OnSaveFileLoaded() public void OnSaveFileLoaded()
{ {
AppLogic.Input(new AppLogic.Input.SaveFileLoaded()); AppLogic.Input(new AppLogic.Input.SaveFileLoaded());
} }
public void OnExitTree() public void OnExitTree()
{ {
AppLogic.Stop(); AppLogic.Stop();
AppBinding.Dispose(); AppBinding.Dispose();
AppRepo.Dispose(); AppRepo.Dispose();
MainMenu.StartGame -= OnStartGame; MainMenu.StartGame -= OnStartGame;
MainMenu.EnemyViewer -= OnEnemyViewer; MainMenu.EnemyViewer -= OnEnemyViewer;
MainMenu.Quit -= OnQuit; MainMenu.Quit -= OnQuit;
} }
} }

View File

@@ -14,10 +14,6 @@ script = ExtResource("1_rt73h")
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
[node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")]
unique_name_in_owner = true
visible = false
[node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")] [node name="OptionsMenu" parent="." instance=ExtResource("2_v0mgf")]
unique_name_in_owner = true unique_name_in_owner = true
visible = false visible = false
@@ -31,3 +27,9 @@ unique_name_in_owner = true
visible = false visible = false
offset_right = 40.0 offset_right = 40.0
offset_bottom = 40.0 offset_bottom = 40.0
[node name="LoadingScreen" parent="." instance=ExtResource("3_3st5l")]
unique_name_in_owner = true
visible = false
top_level = true
z_index = 999

View File

@@ -133,6 +133,7 @@ public partial class BossTypeA : Enemy, IHaveEngagePlayerBehavior, IHaveFollowBe
{ {
SetPhysicsProcess(false); SetPhysicsProcess(false);
_enemyLogic.Input(new EnemyLogic.Input.Defeated()); _enemyLogic.Input(new EnemyLogic.Input.Defeated());
_collisionShape.SetDeferred(CollisionShape3D.PropertyName.Disabled, true);
EnemyHitbox.SetDeferred(CollisionShape3D.PropertyName.Disabled, true); EnemyHitbox.SetDeferred(CollisionShape3D.PropertyName.Disabled, true);
_player.ExperiencePointsComponent.Gain(ExpGiven); _player.ExperiencePointsComponent.Gain(ExpGiven);
EnemyModelView.PlayDeathAnimation(); EnemyModelView.PlayDeathAnimation();

View File

@@ -14,20 +14,27 @@ public partial class DemonWall : Enemy3D
[Node] private new DemonWallModelView EnemyModelView { get; set; } = default!; [Node] private new DemonWallModelView EnemyModelView { get; set; } = default!;
[Node] private Label DemonWallHP { get; set; } = default!;
private Timer _attackTimer; private Timer _attackTimer;
public void OnReady() public void OnReady()
{ {
_attackTimer = new Timer { WaitTime = 5f }; _attackTimer = new Timer { WaitTime = 5f };
_attackTimer.Timeout += AttackTimer_Timeout; _attackTimer.Timeout += AttackTimer_Timeout;
AddChild(_attackTimer); AddChild(_attackTimer);
}
public void OnPhysicsProcess(double delta)
{
DemonWallHP.Text = HealthComponent.CurrentHP.Value + "/" + HealthComponent.MaximumHP.Value;
} }
public override void Activate() public override void Activate()
{ {
SetPhysicsProcess(true); SetPhysicsProcess(true);
EnemyModelView.PlayActivateAnimation(); EnemyModelView.PlayActivateAnimation();
_attackTimer.Start(); _attackTimer.Start();
} }
public override void Idle() public override void Idle()
@@ -38,11 +45,11 @@ public partial class DemonWall : Enemy3D
private void AttackTimer_Timeout() private void AttackTimer_Timeout()
{ {
PerformAction(); PerformAction();
} }
public override void PerformAction() public override void PerformAction()
{ {
EnemyModelView.Attack(_maximumWallMoveAmount); EnemyModelView.Attack(_maximumWallMoveAmount);
} }
} }

View File

@@ -8,10 +8,10 @@
[ext_resource type="AudioStream" uid="uid://bn6ns3jxkw03b" path="res://src/audio/sfx/ENEMY_SPROING_death.ogg" id="6_f313b"] [ext_resource type="AudioStream" uid="uid://bn6ns3jxkw03b" path="res://src/audio/sfx/ENEMY_SPROING_death.ogg" id="6_f313b"]
[sub_resource type="BoxShape3D" id="BoxShape3D_5ht6q"] [sub_resource type="BoxShape3D" id="BoxShape3D_5ht6q"]
size = Vector3(28.3283, 10.355, 4.45671) size = Vector3(29.3551, 17.3836, 4.45671)
[sub_resource type="BoxShape3D" id="BoxShape3D_5gof3"] [sub_resource type="BoxShape3D" id="BoxShape3D_5gof3"]
size = Vector3(28.4577, 8.476, 8.04248) size = Vector3(28.4577, 15.2605, 8.04248)
[node name="Demon Wall" type="CharacterBody3D"] [node name="Demon Wall" type="CharacterBody3D"]
collision_layer = 2 collision_layer = 2
@@ -19,7 +19,7 @@ collision_mask = 2
script = ExtResource("1_dqcrh") script = ExtResource("1_dqcrh")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.40558, 8.3319, 2.53654) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.249016, 4.81762, 2.53654)
shape = SubResource("BoxShape3D_5ht6q") shape = SubResource("BoxShape3D_5ht6q")
[node name="Area3D6" type="Area3D" parent="."] [node name="Area3D6" type="Area3D" parent="."]
@@ -28,12 +28,11 @@ collision_layer = 2048
collision_mask = 0 collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D6"] [node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D6"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.7687, 8.25977, 4.30386) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -14.7687, 4.86754, 4.30386)
shape = SubResource("BoxShape3D_5gof3") shape = SubResource("BoxShape3D_5gof3")
[node name="EnemyModelView" parent="." instance=ExtResource("4_affkc")] [node name="EnemyModelView" parent="." instance=ExtResource("4_affkc")]
unique_name_in_owner = true unique_name_in_owner = true
CanMove = null
[node name="HitSounds" type="Node3D" parent="."] [node name="HitSounds" type="Node3D" parent="."]
@@ -60,3 +59,25 @@ bus = &"SFX"
[node name="AggroSFX" type="AudioStreamPlayer3D" parent="HitSounds"] [node name="AggroSFX" type="AudioStreamPlayer3D" parent="HitSounds"]
unique_name_in_owner = true unique_name_in_owner = true
bus = &"SFX" bus = &"SFX"
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="VFlowContainer" type="VFlowContainer" parent="Control"]
layout_mode = 0
offset_left = 51.0
offset_top = 980.0
offset_right = 659.0
offset_bottom = 1085.0
[node name="Label" type="Label" parent="Control/VFlowContainer"]
layout_mode = 2
text = "Demon Wall HP:"
[node name="DemonWallHP" type="Label" parent="Control/VFlowContainer"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 100)
layout_mode = 2

View File

@@ -58,6 +58,8 @@ public partial class Game : Node3D, IGame
public delegate void SaveFileLoadedEventHandler(); public delegate void SaveFileLoadedEventHandler();
public event Action GameExitRequested; public event Action GameExitRequested;
public event Action GameLoaded;
#endregion #endregion
public RescuedItemDatabase RescuedItems { get; set; } = default!; public RescuedItemDatabase RescuedItems { get; set; } = default!;
@@ -200,6 +202,7 @@ public partial class Game : Node3D, IGame
_effectService = new EffectService(this, _player, _map); _effectService = new EffectService(this, _player, _map);
_player.Activate(); _player.Activate();
await _map.LoadFloor(); await _map.LoadFloor();
GameLoaded?.Invoke();
} }
public async Task Save() => await SaveFile.Save(); public async Task Save() => await SaveFile.Save();

View File

@@ -35,4 +35,6 @@ public interface IGame : IProvide<IGame>, IProvide<IGameRepo>, IProvide<IPlayer>
public QuestData QuestData { get; } public QuestData QuestData { get; }
public event Action GameExitRequested; public event Action GameExitRequested;
public event Action GameLoaded;
} }

View File

@@ -2,6 +2,7 @@ using Chickensoft.AutoInject;
using Chickensoft.Introspection; using Chickensoft.Introspection;
using Godot; using Godot;
using System.Collections.Immutable; using System.Collections.Immutable;
using Zennysoft.Ma.Adapter;
namespace Zennysoft.Game.Ma; namespace Zennysoft.Game.Ma;
@@ -10,6 +11,8 @@ public partial class BossRoomB : Node3D, IBossRoom, IDungeonFloor
{ {
public override void _Notification(int what) => this.Notify(what); public override void _Notification(int what) => this.Notify(what);
[Dependency] public IGame Game => this.DependOn<IGame>();
[Node] public Marker3D PlayerSpawn { get; set; } = default!; [Node] public Marker3D PlayerSpawn { get; set; } = default!;
[Node] public DemonWall DemonWall { get; set; } = default!; [Node] public DemonWall DemonWall { get; set; } = default!;
@@ -18,9 +21,12 @@ public partial class BossRoomB : Node3D, IBossRoom, IDungeonFloor
public ImmutableList<IDungeonRoom> Rooms { get; } public ImmutableList<IDungeonRoom> Rooms { get; }
public bool FloorIsLoaded { get; set; } public bool FloorIsLoaded { get; set; }
[Node] private Area3D _exit { get; set; } = default!;
public void OnReady() public void OnReady()
{ {
ActivateTrap.BodyEntered += ActivateTrap_AreaEntered; ActivateTrap.BodyEntered += ActivateTrap_AreaEntered;
_exit.AreaEntered += Exit_AreaEntered;
} }
private void ActivateTrap_AreaEntered(Node3D area) => StartBossFight(); private void ActivateTrap_AreaEntered(Node3D area) => StartBossFight();
@@ -40,5 +46,14 @@ public partial class BossRoomB : Node3D, IBossRoom, IDungeonFloor
} }
public void ExitReached()
=> Game.FloorExitReached();
private void Exit_AreaEntered(Area3D area)
{
if (area.GetOwner() is IPlayer)
ExitReached();
}
public Transform3D GetPlayerSpawnPoint() => new Transform3D(PlayerSpawn.Basis, new Vector3(PlayerSpawn.Position.X, 0f, PlayerSpawn.Position.Z)); public Transform3D GetPlayerSpawnPoint() => new Transform3D(PlayerSpawn.Basis, new Vector3(PlayerSpawn.Position.X, 0f, PlayerSpawn.Position.Z));
} }

View File

@@ -1,25 +1,25 @@
[gd_scene load_steps=67 format=4 uid="uid://5ja3qxn8h7iw"] [gd_scene load_steps=67 format=4 uid="uid://5ja3qxn8h7iw"]
[ext_resource type="Script" uid="uid://tqyybt313web" path="res://src/map/dungeon/code/BossRoomA.cs" id="1_0h3lb"] [ext_resource type="Script" uid="uid://tqyybt313web" path="res://src/map/dungeon/code/BossRoomA.cs" id="1_tkvnw"]
[ext_resource type="Texture2D" uid="uid://clc5f6yyc7sdw" path="res://src/map/assets/Jomon Bells/BELL ANIMATIONS_concrete_0003_color_1k.png" id="2_lqw6r"] [ext_resource type="PackedScene" uid="uid://j7xsk4fv6f4q" path="res://src/map/dungeon/models/Special Floors & Rooms/Boss Floor A/15_A1_BOSS FLOOR A_VER.2.glb" id="2_giq3n"]
[ext_resource type="PackedScene" uid="uid://j7xsk4fv6f4q" path="res://src/map/dungeon/models/Special Floors & Rooms/Boss Floor A/15_A1_BOSS FLOOR A_VER.2.glb" id="2_r3w6s"] [ext_resource type="PackedScene" uid="uid://bfvy34lj7lns" path="res://src/map/assets/Sarcophagus/sarco altar.glb" id="3_3aamq"]
[ext_resource type="PackedScene" uid="uid://btkyaimv28kjk" path="res://src/map/dungeon/special collision models/BOSS LEVEL 1 Collision.glb" id="3_gshnr"] [ext_resource type="PackedScene" uid="uid://d2rje5p3a0xdg" path="res://src/map/assets/Sarcophagus/sarco.glb" id="4_cs1wi"]
[ext_resource type="Texture2D" uid="uid://dipyrtjclqae1" path="res://src/map/assets/Jomon Bells/BELL ANIMATIONS_COLUMN.jpg" id="3_ucaw1"] [ext_resource type="Texture2D" uid="uid://clc5f6yyc7sdw" path="res://src/map/assets/Jomon Bells/BELL ANIMATIONS_concrete_0003_color_1k.png" id="5_omyhc"]
[ext_resource type="Texture2D" uid="uid://d1xdvf8awh4bi" path="res://src/map/assets/Jomon Bells/BELL ANIMATIONS_CHAIN_TEX.png" id="4_i4jo4"] [ext_resource type="Texture2D" uid="uid://dipyrtjclqae1" path="res://src/map/assets/Jomon Bells/BELL ANIMATIONS_COLUMN.jpg" id="6_hjlh5"]
[ext_resource type="Texture2D" uid="uid://d3e37dca0j8r4" path="res://src/map/dungeon/models/Special Floors & Rooms/Boss Floor A/15_A1_BOSS FLOOR A_VER_CEILING_1.jpg" id="11_1hwdv"] [ext_resource type="Texture2D" uid="uid://d1xdvf8awh4bi" path="res://src/map/assets/Jomon Bells/BELL ANIMATIONS_CHAIN_TEX.png" id="7_55jke"]
[ext_resource type="PackedScene" uid="uid://2wibfnu2jvlv" path="res://src/enemy/enemy_types/14. horse_head/HorseFace.tscn" id="14_jb41f"] [ext_resource type="Shader" uid="uid://dr68ani6ouefm" path="res://src/map/map shaders/B1 Cloud Roll.gdshader" id="8_g5dtd"]
[ext_resource type="PackedScene" uid="uid://8yaqqojv4nuv" path="res://src/enemy/enemy_types/14. horse_head/HorseHeadStatue.tscn" id="15_1ijgn"] [ext_resource type="Texture2D" uid="uid://d3e37dca0j8r4" path="res://src/map/dungeon/models/Special Floors & Rooms/Boss Floor A/15_A1_BOSS FLOOR A_VER_CEILING_1.jpg" id="9_uhy5k"]
[ext_resource type="PackedScene" uid="uid://bvv5giqyrhtl1" path="res://src/enemy/enemy_types/15. ox_face/OxFaceStatue.tscn" id="26_futcf"] [ext_resource type="Texture2D" uid="uid://nljdi5gnv0wr" path="res://src/map/dungeon/models/Special Floors & Rooms/Boss Floor A/15_A1_BOSS FLOOR A_VER_HAND_CYCLE_MOTIF.png" id="10_khpud"]
[ext_resource type="PackedScene" uid="uid://6dnsw37d1uw4" path="res://src/enemy/enemy_types/15. ox_face/OxFace.tscn" id="27_g6y6v"] [ext_resource type="PackedScene" uid="uid://btkyaimv28kjk" path="res://src/map/dungeon/special collision models/BOSS LEVEL 1 Collision.glb" id="11_fbuno"]
[ext_resource type="Shader" uid="uid://dr68ani6ouefm" path="res://src/map/map shaders/B1 Cloud Roll.gdshader" id="30_lmjp4"] [ext_resource type="PackedScene" uid="uid://bvv5giqyrhtl1" path="res://src/enemy/enemy_types/15. ox_face/OxFaceStatue.tscn" id="12_3rjuj"]
[ext_resource type="Texture2D" uid="uid://nljdi5gnv0wr" path="res://src/map/dungeon/models/Special Floors & Rooms/Boss Floor A/15_A1_BOSS FLOOR A_VER_HAND_CYCLE_MOTIF.png" id="31_2uojg"] [ext_resource type="PackedScene" uid="uid://6dnsw37d1uw4" path="res://src/enemy/enemy_types/15. ox_face/OxFace.tscn" id="13_nky7n"]
[ext_resource type="PackedScene" uid="uid://bfvy34lj7lns" path="res://src/map/assets/Sarcophagus/sarco altar.glb" id="58_lqw6r"] [ext_resource type="PackedScene" uid="uid://2wibfnu2jvlv" path="res://src/enemy/enemy_types/14. horse_head/HorseFace.tscn" id="14_i6yjj"]
[ext_resource type="PackedScene" uid="uid://d2rje5p3a0xdg" path="res://src/map/assets/Sarcophagus/sarco.glb" id="59_ucaw1"] [ext_resource type="PackedScene" uid="uid://8yaqqojv4nuv" path="res://src/enemy/enemy_types/14. horse_head/HorseHeadStatue.tscn" id="15_ypixh"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qckvl"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_qckvl"]
resource_name = "Material.018" resource_name = "Material.018"
cull_mode = 2 cull_mode = 2
albedo_texture = ExtResource("2_lqw6r") albedo_texture = ExtResource("5_omyhc")
texture_filter = 2 texture_filter = 2
[sub_resource type="ArrayMesh" id="ArrayMesh_k62tt"] [sub_resource type="ArrayMesh" id="ArrayMesh_k62tt"]
@@ -331,7 +331,7 @@ shadow_mesh = SubResource("ArrayMesh_iphfn")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j43tr"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_j43tr"]
resource_name = "COLUMN" resource_name = "COLUMN"
cull_mode = 2 cull_mode = 2
albedo_texture = ExtResource("3_ucaw1") albedo_texture = ExtResource("6_hjlh5")
[sub_resource type="ArrayMesh" id="ArrayMesh_h6v5d"] [sub_resource type="ArrayMesh" id="ArrayMesh_h6v5d"]
_surfaces = [{ _surfaces = [{
@@ -403,7 +403,7 @@ transparency = 2
alpha_scissor_threshold = 0.5 alpha_scissor_threshold = 0.5
alpha_antialiasing_mode = 0 alpha_antialiasing_mode = 0
cull_mode = 2 cull_mode = 2
albedo_texture = ExtResource("4_i4jo4") albedo_texture = ExtResource("7_55jke")
roughness = 0.5 roughness = 0.5
[sub_resource type="ArrayMesh" id="ArrayMesh_phooe"] [sub_resource type="ArrayMesh" id="ArrayMesh_phooe"]
@@ -506,7 +506,7 @@ curve = SubResource("Curve_54iu8")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_4xaw3"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_4xaw3"]
render_priority = 0 render_priority = 0
shader = ExtResource("30_lmjp4") shader = ExtResource("8_g5dtd")
shader_parameter/height_scale = 0.03 shader_parameter/height_scale = 0.03
shader_parameter/wave_speed = 0.2 shader_parameter/wave_speed = 0.2
shader_parameter/upper_transparency = 0.99 shader_parameter/upper_transparency = 0.99
@@ -529,12 +529,12 @@ size = Vector3(1, 6.60916, 9.21739)
resource_name = "CEILING 1.007" resource_name = "CEILING 1.007"
transparency = 4 transparency = 4
cull_mode = 2 cull_mode = 2
albedo_texture = ExtResource("11_1hwdv") albedo_texture = ExtResource("9_uhy5k")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g6nnl"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_g6nnl"]
resource_name = "HAND CYCLE" resource_name = "HAND CYCLE"
cull_mode = 2 cull_mode = 2
albedo_texture = ExtResource("31_2uojg") albedo_texture = ExtResource("10_khpud")
[sub_resource type="ArrayMesh" id="ArrayMesh_lfi70"] [sub_resource type="ArrayMesh" id="ArrayMesh_lfi70"]
_surfaces = [{ _surfaces = [{
@@ -647,20 +647,20 @@ adjustment_saturation = 0.94
dof_blur_far_distance = 42.38 dof_blur_far_distance = 42.38
[node name="Boss Floor A" type="Node3D"] [node name="Boss Floor A" type="Node3D"]
script = ExtResource("1_0h3lb") script = ExtResource("1_tkvnw")
[node name="Model" type="Node3D" parent="."] [node name="Model" type="Node3D" parent="."]
[node name="15_A1_BOSS FLOOR A_VER_3" parent="Model" instance=ExtResource("2_r3w6s")] [node name="15_A1_BOSS FLOOR A_VER_3" parent="Model" instance=ExtResource("2_giq3n")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -157.601, -16.1094, 21.8408) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -157.601, -16.1094, 21.8408)
[node name="LOCKED GATE" parent="Model/15_A1_BOSS FLOOR A_VER_3" index="0"] [node name="LOCKED GATE" parent="Model/15_A1_BOSS FLOOR A_VER_3" index="0"]
visible = false visible = false
[node name="sarco altar" parent="Model" instance=ExtResource("58_lqw6r")] [node name="sarco altar" parent="Model" instance=ExtResource("3_3aamq")]
transform = Transform3D(0.565, 0, 0, 0, 0.565, 0, 0, 0, 0.565, -92.0811, -2.7728, 3.95434) transform = Transform3D(0.565, 0, 0, 0, 0.565, 0, 0, 0, 0.565, -92.0811, -2.7728, 3.95434)
[node name="sarco" parent="Model" instance=ExtResource("59_ucaw1")] [node name="sarco" parent="Model" instance=ExtResource("4_cs1wi")]
transform = Transform3D(0.55, 0, 0, 0, 0.55, 0, 0, 0, 0.55, -92.04, -2.83756, 3.9847) transform = Transform3D(0.55, 0, 0, 0, 0.55, 0, 0, 0, 0.55, -92.04, -2.83756, 3.9847)
[node name="BELL ANIMATIONS" type="Node3D" parent="Model"] [node name="BELL ANIMATIONS" type="Node3D" parent="Model"]
@@ -761,7 +761,7 @@ transform = Transform3D(0.816274, 0, 0, 0, 1.99383, 0, 0, 0, 1.99383, -144.771,
mesh = SubResource("ArrayMesh_i5h1f") mesh = SubResource("ArrayMesh_i5h1f")
skeleton = NodePath("") skeleton = NodePath("")
[node name="BOSS LEVEL 1 Collision" parent="Collision/NavigationRegion3D" instance=ExtResource("3_gshnr")] [node name="BOSS LEVEL 1 Collision" parent="Collision/NavigationRegion3D" instance=ExtResource("11_fbuno")]
visible = false visible = false
[node name="Main Structure 1_001" parent="Collision/NavigationRegion3D/BOSS LEVEL 1 Collision" index="0"] [node name="Main Structure 1_001" parent="Collision/NavigationRegion3D/BOSS LEVEL 1 Collision" index="0"]
@@ -868,11 +868,11 @@ shape = SubResource("BoxShape3D_1qa0g")
[node name="OxFace" type="Node3D" parent="Bosses"] [node name="OxFace" type="Node3D" parent="Bosses"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -103.103, -0.510939, 13.3065) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -103.103, -0.510939, 13.3065)
[node name="OxFaceStatue" parent="Bosses/OxFace" instance=ExtResource("26_futcf")] [node name="OxFaceStatue" parent="Bosses/OxFace" instance=ExtResource("12_3rjuj")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 10.2518, -1.84854, -1.2916) transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 10.2518, -1.84854, -1.2916)
[node name="OxFace" parent="Bosses/OxFace" instance=ExtResource("27_g6y6v")] [node name="OxFace" parent="Bosses/OxFace" instance=ExtResource("13_nky7n")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 10.5263, -1.96946, -2.35483) transform = Transform3D(1, 0, 3.55271e-15, 0, 1, 0, -3.55271e-15, 0, 1, 10.5263, -1.96946, -2.35483)
visible = false visible = false
@@ -881,13 +881,13 @@ InitialHP = 125
[node name="HorseHead" type="Node3D" parent="Bosses"] [node name="HorseHead" type="Node3D" parent="Bosses"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.862301, 0, 2.20054) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.862301, 0, 2.20054)
[node name="HorseHead" parent="Bosses/HorseHead" instance=ExtResource("14_jb41f")] [node name="HorseHead" parent="Bosses/HorseHead" instance=ExtResource("14_i6yjj")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -101.714, -1.38925, 10.8406) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -101.714, -1.38925, 10.8406)
visible = false visible = false
InitialHP = 125 InitialHP = 125
[node name="HorseHeadStatue" parent="Bosses/HorseHead" instance=ExtResource("15_1ijgn")] [node name="HorseHeadStatue" parent="Bosses/HorseHead" instance=ExtResource("15_ypixh")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -101.651, -2.53702, 10.6128) transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -101.651, -2.53702, 10.6128)

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=21 format=3 uid="uid://ceo7ph483io44"] [gd_scene load_steps=22 format=3 uid="uid://ceo7ph483io44"]
[ext_resource type="Script" uid="uid://cvj30id0i8ska" path="res://src/map/dungeon/code/BossRoomB.cs" id="1_bxvob"] [ext_resource type="Script" uid="uid://cvj30id0i8ska" path="res://src/map/dungeon/code/BossRoomB.cs" id="1_bxvob"]
[ext_resource type="PackedScene" uid="uid://b1sapqymt8fo8" path="res://src/map/dungeon/special collision models/Boss Floor 2 Collision.glb" id="3_s7h55"] [ext_resource type="PackedScene" uid="uid://b1sapqymt8fo8" path="res://src/map/dungeon/special collision models/Boss Floor 2 Collision.glb" id="3_s7h55"]
@@ -22,6 +22,9 @@ data = PackedVector3Array(34.8069, -5.6401, 15.5713, 39.9347, -5.6401, 11.3491,
[sub_resource type="BoxShape3D" id="BoxShape3D_bxvob"] [sub_resource type="BoxShape3D" id="BoxShape3D_bxvob"]
size = Vector3(31.5159, 15.6586, 11.8418) size = Vector3(31.5159, 15.6586, 11.8418)
[sub_resource type="BoxShape3D" id="BoxShape3D_s7h55"]
size = Vector3(12.4734, 21.4398, 22.1963)
[sub_resource type="ShaderMaterial" id="ShaderMaterial_x4buj"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_x4buj"]
shader = ExtResource("27_yu47a") shader = ExtResource("27_yu47a")
shader_parameter/day_top_color = Color(0, 0, 0, 1) shader_parameter/day_top_color = Color(0, 0, 0, 1)
@@ -166,6 +169,16 @@ collision_mask = 2
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.197388, 31.0529, 77.0455) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.197388, 31.0529, 77.0455)
shape = SubResource("BoxShape3D_bxvob") shape = SubResource("BoxShape3D_bxvob")
[node name="Exit" type="Area3D" parent="Room"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.38405, 28.4329, -47.1473)
collision_layer = 256
collision_mask = 256
[node name="CollisionShape3D" type="CollisionShape3D" parent="Room/Exit"]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 2.40306, 1.97824, 1.68882)
shape = SubResource("BoxShape3D_s7h55")
[node name="DemonWall" parent="." instance=ExtResource("25_k2q0o")] [node name="DemonWall" parent="." instance=ExtResource("25_k2q0o")]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.747, 3.84071, 55.334) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.747, 3.84071, 55.334)

View File

@@ -11157,7 +11157,7 @@ transform = Transform3D(0.99, 0, 0, 0, 0.99, 0, 0, 0, 0.99, -132.777, 0, -5.0904
[node name="PlayerSpawnPoint" type="Marker3D" parent="Spawn Points"] [node name="PlayerSpawnPoint" type="Marker3D" parent="Spawn Points"]
unique_name_in_owner = true unique_name_in_owner = true
transform = Transform3D(-0.0104718, 0, 0.999944, 0, 0.999999, 0, -0.999944, 0, -0.0104718, -207.082, 2.4, 35.425) transform = Transform3D(-0.0871557, 0, -0.996193, 0, 0.999999, 0, 0.996193, 0, -0.0871557, -207.082, 3.25741, 35.425)
[node name="Exit" type="Area3D" parent="Spawn Points"] [node name="Exit" type="Area3D" parent="Spawn Points"]
unique_name_in_owner = true unique_name_in_owner = true

View File

@@ -38,34 +38,42 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
public event Action TransitionCompleted; public event Action TransitionCompleted;
private bool _fadingIn = false;
public void OnResolved() public void OnResolved()
{ {
_player.ExperiencePointsComponent.Level.Sync += Level_Sync; _player.ExperiencePointsComponent.Level.Sync += Level_Sync;
_player.ExperiencePointsComponent.CurrentExp.Sync += Exp_Sync; _player.ExperiencePointsComponent.CurrentExp.Sync += Exp_Sync;
_player.ExperiencePointsComponent.ExpToNextLevel.Sync += Exp_Sync; _player.ExperiencePointsComponent.ExpToNextLevel.Sync += Exp_Sync;
_player.HealthComponent.CurrentHP.Sync += HP_Sync; _player.HealthComponent.CurrentHP.Sync += HP_Sync;
_player.HealthComponent.MaximumHP.Sync += HP_Sync; _player.HealthComponent.MaximumHP.Sync += HP_Sync;
_player.VTComponent.CurrentVT.Sync += VT_Sync; _player.VTComponent.CurrentVT.Sync += VT_Sync;
_player.VTComponent.MaximumVT.Sync += VT_Sync; _player.VTComponent.MaximumVT.Sync += VT_Sync;
_player.AttackComponent.CurrentAttack.Sync += Attack_Sync; _player.AttackComponent.CurrentAttack.Sync += Attack_Sync;
_player.AttackComponent.MaximumAttack.Sync += Attack_Sync; _player.AttackComponent.MaximumAttack.Sync += Attack_Sync;
_player.DefenseComponent.CurrentDefense.Sync += Defense_Sync; _player.DefenseComponent.CurrentDefense.Sync += Defense_Sync;
_player.DefenseComponent.MaximumDefense.Sync += Defense_Sync; _player.DefenseComponent.MaximumDefense.Sync += Defense_Sync;
_player.EquipmentComponent.EquipmentChanged += EquipmentComponent_EquipmentChanged; _player.EquipmentComponent.EquipmentChanged += EquipmentComponent_EquipmentChanged;
_map.CurrentFloorNumber.Sync += CurrentFloorNumber_Sync; _map.CurrentFloorNumber.Sync += CurrentFloorNumber_Sync;
AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished; AnimationPlayer.AnimationFinished += AnimationPlayer_AnimationFinished;
AnimationPlayer.AnimationStarted += AnimationPlayer_AnimationStarted; AnimationPlayer.AnimationStarted += AnimationPlayer_AnimationStarted;
ContinueButton.Pressed += ContinueButton_Pressed; ContinueButton.Pressed += ContinueButton_Pressed;
ExitButton.Pressed += ExitButton_Pressed; ExitButton.Pressed += ExitButton_Pressed;
}
public override void _Input(InputEvent @event)
{
if (_fadingIn)
GetViewport().SetInputAsHandled();
} }
private void CurrentFloorNumber_Sync(int _) => FloorNumber.Text = _map.CurrentFloorNumber.Value.ToString("D2"); private void CurrentFloorNumber_Sync(int _) => FloorNumber.Text = _map.CurrentFloorNumber.Value.ToString("D2");
private void EquipmentComponent_EquipmentChanged(EquipableItem obj) private void EquipmentComponent_EquipmentChanged(EquipableItem obj)
{ {
Attack_Sync(0); Attack_Sync(0);
Defense_Sync(0); Defense_Sync(0);
} }
private void Attack_Sync(int _) => ATKLabel.Text = $"{_player.AttackComponent.CurrentAttack.Value}/{_player.AttackComponent.MaximumAttack.Value}+{_player.EquipmentComponent.BonusAttack}"; private void Attack_Sync(int _) => ATKLabel.Text = $"{_player.AttackComponent.CurrentAttack.Value}/{_player.AttackComponent.MaximumAttack.Value}+{_player.EquipmentComponent.BonusAttack}";
@@ -78,35 +86,44 @@ public partial class LoadNextLevel : Control, IFloorClearMenu
private void ExitButton_Pressed() private void ExitButton_Pressed()
{ {
ContinueButton.Disabled = true; ContinueButton.Disabled = true;
ExitButton.Disabled = true; ExitButton.Disabled = true;
FadeOut(); FadeOut();
Exit?.Invoke(); Exit?.Invoke();
} }
private void ContinueButton_Pressed() private void ContinueButton_Pressed()
{ {
ContinueButton.Disabled = true; ContinueButton.Disabled = true;
ExitButton.Disabled = true; ExitButton.Disabled = true;
GoToNextFloor?.Invoke(); GoToNextFloor?.Invoke();
} }
private void AnimationPlayer_AnimationStarted(StringName animName) private void AnimationPlayer_AnimationStarted(StringName animName)
{ {
if (animName == "fade_in") if (animName == "fade_in")
ContinueButton.CallDeferred(MethodName.GrabFocus); {
if (animName == "fade_out") _fadingIn = true;
CallDeferred(MethodName.ReleaseFocus); ContinueButton.Disabled = true;
ExitButton.Disabled = true;
ContinueButton.CallDeferred(MethodName.GrabFocus);
}
if (animName == "fade_out")
{
_fadingIn = true;
CallDeferred(MethodName.ReleaseFocus);
}
} }
private void AnimationPlayer_AnimationFinished(StringName animName) private void AnimationPlayer_AnimationFinished(StringName animName)
{ {
if (animName == "fade_in") if (animName == "fade_in")
{ {
ContinueButton.Disabled = false; _fadingIn = false;
ExitButton.Disabled = false; ContinueButton.Disabled = false;
} ExitButton.Disabled = false;
if (animName == "fade_out") }
TransitionCompleted?.Invoke(); if (animName == "fade_out")
TransitionCompleted?.Invoke();
} }
} }

View File

@@ -1,22 +1,12 @@
[gd_scene load_steps=18 format=3 uid="uid://cgwiwufvxvfs4"] [gd_scene load_steps=14 format=3 uid="uid://cgwiwufvxvfs4"]
[ext_resource type="Script" uid="uid://k16ufrh1147t" path="res://src/ui/load_next_level/LoadNextLevel.cs" id="1_t6aoa"] [ext_resource type="Script" uid="uid://k16ufrh1147t" path="res://src/ui/load_next_level/LoadNextLevel.cs" id="1_t6aoa"]
[ext_resource type="Texture2D" uid="uid://vtecp7jh15kg" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Next_Floor_720_16_9.png" id="2_5vf6u"] [ext_resource type="Texture2D" uid="uid://vtecp7jh15kg" path="res://src/ui/rendered_assets/SCREEN_RENDERS_Next_Floor_720_16_9.png" id="2_5vf6u"]
[ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="3_n7di7"] [ext_resource type="FontFile" uid="uid://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="3_n7di7"]
[ext_resource type="StyleBox" uid="uid://bxuy4tnftibfq" path="res://src/options/SelectedOptionsBox.tres" id="4_e3fxd"]
[ext_resource type="LabelSettings" uid="uid://bgnwcs434ppkf" path="res://src/ui/label_settings/EbrimaText.tres" id="4_touw6"] [ext_resource type="LabelSettings" uid="uid://bgnwcs434ppkf" path="res://src/ui/label_settings/EbrimaText.tres" id="4_touw6"]
[ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="5_6ox5a"] [ext_resource type="FontFile" uid="uid://beh6d5lo5ihq0" path="res://src/ui/fonts/georgiai.ttf" id="5_6ox5a"]
[ext_resource type="StyleBox" uid="uid://bl15q835s4ene" path="res://src/options/UnselectedOptionsBox.tres" id="5_45afn"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1tca4"]
[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"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cmr8o"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ahhj2"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ahhj2"]
@@ -53,7 +43,6 @@ tracks/1/keys = {
[sub_resource type="Animation" id="Animation_efhb5"] [sub_resource type="Animation" id="Animation_efhb5"]
resource_name = "fade_in" resource_name = "fade_in"
length = 2.0
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
@@ -61,7 +50,7 @@ tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
"times": PackedFloat32Array(0, 2), "times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1), "transitions": PackedFloat32Array(1, 1),
"update": 0, "update": 0,
"values": [Color(0, 0, 0, 1), Color(1, 1, 1, 1)] "values": [Color(0, 0, 0, 1), Color(1, 1, 1, 1)]
@@ -81,7 +70,6 @@ tracks/1/keys = {
[sub_resource type="Animation" id="Animation_ibgld"] [sub_resource type="Animation" id="Animation_ibgld"]
resource_name = "fade_out" resource_name = "fade_out"
length = 2.0
tracks/0/type = "value" tracks/0/type = "value"
tracks/0/imported = false tracks/0/imported = false
tracks/0/enabled = true tracks/0/enabled = true
@@ -89,7 +77,7 @@ tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1 tracks/0/interp = 1
tracks/0/loop_wrap = true tracks/0/loop_wrap = true
tracks/0/keys = { tracks/0/keys = {
"times": PackedFloat32Array(0, 1.8), "times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1), "transitions": PackedFloat32Array(1, 1),
"update": 0, "update": 0,
"values": [Color(1, 1, 1, 1), Color(0, 0, 0, 1)] "values": [Color(1, 1, 1, 1), Color(0, 0, 0, 1)]
@@ -138,8 +126,8 @@ theme_override_constants/separation = 20
[node name="ContinueButton" type="Button" parent="MarginContainer/VBoxContainer"] [node name="ContinueButton" type="Button" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
custom_minimum_size = Vector2(100, 0)
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4
focus_neighbor_left = NodePath(".") focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath(".") focus_neighbor_top = NodePath(".")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
@@ -148,11 +136,17 @@ theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_fonts/font = ExtResource("3_n7di7") theme_override_fonts/font = ExtResource("3_n7di7")
theme_override_font_sizes/font_size = 50 theme_override_font_sizes/font_size = 50
theme_override_styles/focus = SubResource("StyleBoxEmpty_1tca4") theme_override_styles/focus = ExtResource("4_e3fxd")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_crnka") theme_override_styles/disabled_mirrored = ExtResource("4_e3fxd")
theme_override_styles/hover = SubResource("StyleBoxEmpty_crnka") theme_override_styles/disabled = ExtResource("4_e3fxd")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_1pd8j") theme_override_styles/hover_pressed_mirrored = ExtResource("4_e3fxd")
theme_override_styles/normal = SubResource("StyleBoxEmpty_crnka") theme_override_styles/hover_pressed = ExtResource("4_e3fxd")
theme_override_styles/hover_mirrored = ExtResource("4_e3fxd")
theme_override_styles/hover = ExtResource("4_e3fxd")
theme_override_styles/pressed_mirrored = ExtResource("4_e3fxd")
theme_override_styles/pressed = ExtResource("4_e3fxd")
theme_override_styles/normal_mirrored = ExtResource("4_e3fxd")
theme_override_styles/normal = ExtResource("4_e3fxd")
button_mask = 0 button_mask = 0
text = "CONTINUE" text = "CONTINUE"
flat = true flat = true
@@ -160,6 +154,7 @@ flat = true
[node name="ExitButton" type="Button" parent="MarginContainer/VBoxContainer"] [node name="ExitButton" type="Button" parent="MarginContainer/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4
focus_neighbor_left = NodePath(".") focus_neighbor_left = NodePath(".")
focus_neighbor_top = NodePath("../ContinueButton") focus_neighbor_top = NodePath("../ContinueButton")
focus_neighbor_right = NodePath(".") focus_neighbor_right = NodePath(".")
@@ -168,17 +163,17 @@ theme_override_colors/font_color = Color(0.737255, 0.705882, 0.690196, 1)
theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1) theme_override_colors/font_focus_color = Color(1, 0.94902, 0, 1)
theme_override_fonts/font = ExtResource("3_n7di7") theme_override_fonts/font = ExtResource("3_n7di7")
theme_override_font_sizes/font_size = 50 theme_override_font_sizes/font_size = 50
theme_override_styles/focus = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/focus = ExtResource("4_e3fxd")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/disabled_mirrored = ExtResource("5_45afn")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/disabled = ExtResource("5_45afn")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/hover_pressed_mirrored = ExtResource("5_45afn")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/hover_pressed = ExtResource("5_45afn")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/hover_mirrored = ExtResource("5_45afn")
theme_override_styles/hover = SubResource("StyleBoxEmpty_svmjr") theme_override_styles/hover = ExtResource("5_45afn")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/pressed_mirrored = ExtResource("5_45afn")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_svmjr") theme_override_styles/pressed = ExtResource("5_45afn")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_yoep7") theme_override_styles/normal_mirrored = ExtResource("5_45afn")
theme_override_styles/normal = SubResource("StyleBoxEmpty_cmr8o") theme_override_styles/normal = ExtResource("5_45afn")
button_mask = 0 button_mask = 0
text = "EXIT TOWER" text = "EXIT TOWER"
flat = true flat = true

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=3 uid="uid://bea2waybmgd6u"] [gd_scene load_steps=12 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="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://cm8j5vcdop5x0" path="res://src/ui/fonts/Mrs-Eaves-OT-Roman_31443.ttf" id="2_i6kb2"]
@@ -14,8 +14,6 @@ font_size = 48
outline_size = 2 outline_size = 2
outline_color = Color(0, 0, 0, 1) outline_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1pd8j"]
[sub_resource type="Animation" id="Animation_xrfau"] [sub_resource type="Animation" id="Animation_xrfau"]
length = 0.001 length = 0.001
tracks/0/type = "value" tracks/0/type = "value"
@@ -152,11 +150,11 @@ theme_override_fonts/font = ExtResource("3_tygw6")
theme_override_font_sizes/font_size = 50 theme_override_font_sizes/font_size = 50
theme_override_styles/focus = ExtResource("4_43cjp") theme_override_styles/focus = ExtResource("4_43cjp")
theme_override_styles/disabled_mirrored = ExtResource("5_sytxg") theme_override_styles/disabled_mirrored = ExtResource("5_sytxg")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_1pd8j") theme_override_styles/disabled = ExtResource("5_sytxg")
theme_override_styles/hover_pressed_mirrored = ExtResource("5_sytxg") theme_override_styles/hover_pressed_mirrored = ExtResource("5_sytxg")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_1pd8j") theme_override_styles/hover_pressed = ExtResource("5_sytxg")
theme_override_styles/hover_mirrored = ExtResource("5_sytxg") theme_override_styles/hover_mirrored = ExtResource("5_sytxg")
theme_override_styles/hover = SubResource("StyleBoxEmpty_1pd8j") theme_override_styles/hover = ExtResource("5_sytxg")
theme_override_styles/pressed_mirrored = ExtResource("5_sytxg") theme_override_styles/pressed_mirrored = ExtResource("5_sytxg")
theme_override_styles/pressed = ExtResource("5_sytxg") theme_override_styles/pressed = ExtResource("5_sytxg")
theme_override_styles/normal_mirrored = ExtResource("5_sytxg") theme_override_styles/normal_mirrored = ExtResource("5_sytxg")
@@ -179,8 +177,11 @@ theme_override_fonts/font = ExtResource("3_tygw6")
theme_override_font_sizes/font_size = 50 theme_override_font_sizes/font_size = 50
theme_override_styles/focus = ExtResource("4_43cjp") theme_override_styles/focus = ExtResource("4_43cjp")
theme_override_styles/disabled_mirrored = ExtResource("5_sytxg") theme_override_styles/disabled_mirrored = ExtResource("5_sytxg")
theme_override_styles/disabled = ExtResource("5_sytxg")
theme_override_styles/hover_pressed_mirrored = ExtResource("5_sytxg") theme_override_styles/hover_pressed_mirrored = ExtResource("5_sytxg")
theme_override_styles/hover_pressed = ExtResource("5_sytxg")
theme_override_styles/hover_mirrored = ExtResource("5_sytxg") theme_override_styles/hover_mirrored = ExtResource("5_sytxg")
theme_override_styles/hover = ExtResource("5_sytxg")
theme_override_styles/pressed_mirrored = ExtResource("5_sytxg") theme_override_styles/pressed_mirrored = ExtResource("5_sytxg")
theme_override_styles/pressed = ExtResource("5_sytxg") theme_override_styles/pressed = ExtResource("5_sytxg")
theme_override_styles/normal_mirrored = ExtResource("5_sytxg") theme_override_styles/normal_mirrored = ExtResource("5_sytxg")