Re-implement audio managers
This commit is contained in:
BIN
Zennysoft.Game.Ma/src/ui/fonts/LSANS.TTF
Normal file
BIN
Zennysoft.Game.Ma/src/ui/fonts/LSANS.TTF
Normal file
Binary file not shown.
35
Zennysoft.Game.Ma/src/ui/fonts/LSANS.TTF.import
Normal file
35
Zennysoft.Game.Ma/src/ui/fonts/LSANS.TTF.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://duu4matpexcq4"
|
||||
path="res://.godot/imported/LSANS.TTF-d79a67bdf91978c92080f7e66d1f55e1.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/LSANS.TTF"
|
||||
dest_files=["res://.godot/imported/LSANS.TTF-d79a67bdf91978c92080f7e66d1f55e1.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
Zennysoft.Game.Ma/src/ui/fonts/LSANSI.TTF
Normal file
BIN
Zennysoft.Game.Ma/src/ui/fonts/LSANSI.TTF
Normal file
Binary file not shown.
35
Zennysoft.Game.Ma/src/ui/fonts/LSANSI.TTF.import
Normal file
35
Zennysoft.Game.Ma/src/ui/fonts/LSANSI.TTF.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://ddvfnyovqnvew"
|
||||
path="res://.godot/imported/LSANSI.TTF-933d72b8e06870ea75e94dec9e7c3739.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/LSANSI.TTF"
|
||||
dest_files=["res://.godot/imported/LSANSI.TTF-933d72b8e06870ea75e94dec9e7c3739.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
Zennysoft.Game.Ma/src/ui/fonts/bodoni-italic.ttf
Normal file
BIN
Zennysoft.Game.Ma/src/ui/fonts/bodoni-italic.ttf
Normal file
Binary file not shown.
35
Zennysoft.Game.Ma/src/ui/fonts/bodoni-italic.ttf.import
Normal file
35
Zennysoft.Game.Ma/src/ui/fonts/bodoni-italic.ttf.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://bt7dv5ayfvmti"
|
||||
path="res://.godot/imported/bodoni-italic.ttf-0ac4d4b30226a55a6a8013356286245b.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/ui/fonts/bodoni-italic.ttf"
|
||||
dest_files=["res://.godot/imported/bodoni-italic.ttf-0ac4d4b30226a55a6a8013356286245b.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=4
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://b1muxus5qdbeu"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://b1muxus5qdbeu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dlq2mkhl4pe7a" path="res://src/ui/in_game_ui/InGameUI.cs" id="1_sc13i"]
|
||||
[ext_resource type="PackedScene" uid="uid://bwbofurcvf3yh" path="res://src/minimap/Minimap.tscn" id="2_6sfje"]
|
||||
@@ -8,6 +8,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://x0f1ol50nnp3" path="res://src/ui/in_game_ui/InventoryMessageUI.tscn" id="6_y26qy"]
|
||||
[ext_resource type="Script" uid="uid://dj6oqler47dqf" path="res://src/utils/FpsCounter.cs" id="7_c6o8j"]
|
||||
[ext_resource type="PackedScene" uid="uid://8f3dk16nj0dn" path="res://src/menu/DebugMenu.tscn" id="7_llomk"]
|
||||
[ext_resource type="Texture2D" uid="uid://bj4p4qxb1mj3q" path="res://src/ui/player_ui/Assets/panel rough draft.png" id="7_ur8ag"]
|
||||
|
||||
[node name="InGameUI" type="Control"]
|
||||
process_mode = 3
|
||||
@@ -84,40 +85,58 @@ layout_mode = 2
|
||||
[node name="Panel" type="ColorRect" parent="HBoxContainer"]
|
||||
custom_minimum_size = Vector2(480, 0)
|
||||
layout_mode = 2
|
||||
color = Color(0.192157, 0.27451, 0.258824, 1)
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="HBoxContainer/Panel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_constants/margin_left = 25
|
||||
theme_override_constants/margin_top = 25
|
||||
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/Panel"]
|
||||
layout_mode = 0
|
||||
offset_right = 480.0
|
||||
offset_bottom = 1082.0
|
||||
texture = ExtResource("7_ur8ag")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/Panel/MarginContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="PlayerInfoUI" parent="HBoxContainer/Panel/MarginContainer/VBoxContainer" instance=ExtResource("4_46s5l")]
|
||||
[node name="PlayerInfoUI" parent="HBoxContainer/Panel" instance=ExtResource("4_46s5l")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
anchors_preset = 0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
offset_left = 25.0
|
||||
offset_top = 175.0
|
||||
offset_right = 480.0
|
||||
offset_bottom = 361.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="MinimapZone" type="CenterContainer" parent="HBoxContainer/Panel/MarginContainer/VBoxContainer"]
|
||||
custom_minimum_size = Vector2(350, 300)
|
||||
[node name="MinimapZone" type="Panel" parent="HBoxContainer/Panel"]
|
||||
layout_mode = 2
|
||||
offset_left = 54.0
|
||||
offset_top = 369.0
|
||||
offset_right = 424.0
|
||||
offset_bottom = 637.0
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="HBoxContainer/Panel/MarginContainer/VBoxContainer/MinimapZone"]
|
||||
[node name="ColorRect" type="ColorRect" parent="HBoxContainer/Panel/MinimapZone"]
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(350, 300)
|
||||
layout_mode = 2
|
||||
offset_left = 52.0
|
||||
offset_right = 402.0
|
||||
offset_bottom = 300.0
|
||||
color = Color(0.027451, 0.0901961, 0.0745098, 1)
|
||||
|
||||
[node name="MiniMap" parent="HBoxContainer/Panel/MarginContainer/VBoxContainer/MinimapZone" instance=ExtResource("2_6sfje")]
|
||||
[node name="MiniMap" parent="HBoxContainer/Panel/MinimapZone" instance=ExtResource("2_6sfje")]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(350, 300)
|
||||
custom_minimum_size = Vector2(50, 50)
|
||||
layout_mode = 2
|
||||
anchors_preset = 0
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
anchor_right = 0.0
|
||||
anchor_bottom = 0.0
|
||||
offset_left = 3.0
|
||||
offset_right = 370.0
|
||||
offset_bottom = 266.0
|
||||
|
||||
[node name="Sigil Marker" type="ReferenceRect" parent="HBoxContainer/Panel/MarginContainer/VBoxContainer"]
|
||||
[node name="Sigil Marker" type="ReferenceRect" parent="HBoxContainer/Panel"]
|
||||
layout_mode = 2
|
||||
offset_left = 78.0
|
||||
offset_top = 817.0
|
||||
offset_right = 268.0
|
||||
offset_bottom = 1009.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
@@ -30,8 +30,6 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
[Dependency] public IMap _map => this.DependOn<IMap>();
|
||||
|
||||
[Dependency] public IGameEventDepot GameEventDepot => this.DependOn<IGameEventDepot>();
|
||||
|
||||
private InventoryPageNumber _currentPageNumber = InventoryPageNumber.FirstPage;
|
||||
|
||||
private string ITEM_SLOT_SCENE = "res://src/ui/inventory_menu/ItemSlot.tscn";
|
||||
@@ -162,8 +160,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
{
|
||||
HideUserActionPrompt();
|
||||
ShowInventoryInfo();
|
||||
GameEventDepot.OnMenuBackedOut();
|
||||
Autoload.InGameAudio.Cancel.Play();
|
||||
Autoload.AudioManager.Play(SoundEffect.Cancel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -181,7 +178,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
Player.Stats.BonusAttack.Sync -= BonusAttack_Sync;
|
||||
Player.Stats.BonusDefense.Sync -= BonusDefense_Sync;
|
||||
_gameRepo.CloseInventory();
|
||||
Autoload.InGameAudio.Cancel.Play();
|
||||
Autoload.AudioManager.Play(SoundEffect.Cancel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,8 +200,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
SetToUnselectedStyle(ItemSlots.ElementAt(oldIndex));
|
||||
SetToSelectedStyle(ItemSlots.ElementAt(newIndex));
|
||||
GameEventDepot.OnMenuScrolled();
|
||||
Autoload.InGameAudio.MoveThroughOptions.Play();
|
||||
Autoload.AudioManager.Play(SoundEffect.MoveThroughOptions);
|
||||
_currentIndex = newIndex;
|
||||
}
|
||||
|
||||
@@ -218,15 +214,14 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
|
||||
SetToUnselectedStyle(ItemSlots.ElementAt(oldIndex));
|
||||
SetToSelectedStyle(ItemSlots.ElementAt(newIndex));
|
||||
GameEventDepot.OnMenuScrolled();
|
||||
Autoload.InGameAudio.MoveThroughOptions.Play();
|
||||
Autoload.AudioManager.Play(SoundEffect.MoveThroughOptions);
|
||||
_currentIndex = newIndex;
|
||||
}
|
||||
|
||||
if (@event.IsActionPressed(GameInputs.UiAccept))
|
||||
{
|
||||
DisplayUserActionPrompt();
|
||||
Autoload.InGameAudio.Select.Play();
|
||||
Autoload.AudioManager.Play(SoundEffect.Select);
|
||||
}
|
||||
|
||||
if (@event.IsActionPressed(GameInputs.InventorySort))
|
||||
@@ -234,7 +229,6 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
inventory.Sort();
|
||||
if (_currentIndex > inventory.Items.Count - 1)
|
||||
_currentIndex = inventory.Items.Count - 1;
|
||||
GameEventDepot.OnInventorySorted();
|
||||
RefreshInventoryScreen();
|
||||
}
|
||||
}
|
||||
@@ -327,8 +321,7 @@ public partial class InventoryMenu : Control, IInventoryMenu
|
||||
_currentIndex = 0;
|
||||
_currentPageNumber = pageToChangeTo;
|
||||
await RefreshInventoryScreen();
|
||||
GameEventDepot.OnMenuScrolled();
|
||||
Autoload.InGameAudio.MoveThroughOptions.Play();
|
||||
Autoload.AudioManager.Play(SoundEffect.MoveThroughOptions);
|
||||
}
|
||||
|
||||
private async void PopulateInventory()
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +1,7 @@
|
||||
[gd_resource type="LabelSettings" load_steps=2 format=3 uid="uid://dupifadnagodp"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://dit3vylt7hmmx" path="res://src/ui/fonts/FT88-Regular.ttf" id="1_u174r"]
|
||||
[ext_resource type="FontFile" uid="uid://bt7dv5ayfvmti" path="res://src/ui/fonts/bodoni-italic.ttf" id="1_scy74"]
|
||||
|
||||
[resource]
|
||||
font = ExtResource("1_u174r")
|
||||
font = ExtResource("1_scy74")
|
||||
font_size = 32
|
||||
font_color = Color(0.737255, 0.705882, 0.690196, 1)
|
||||
|
||||
@@ -50,7 +50,7 @@ public partial class PlayerInfoUI : Control, IPlayerInfoUI
|
||||
|
||||
private void CurrentLevel_Sync(int obj)
|
||||
{
|
||||
LevelNumber.Text = $"LVL. {obj}";
|
||||
LevelNumber.Text = $"{obj}";
|
||||
}
|
||||
|
||||
private void MaximumVT_Sync(int obj)
|
||||
@@ -79,10 +79,10 @@ public partial class PlayerInfoUI : Control, IPlayerInfoUI
|
||||
|
||||
private void CurrentExp_Sync(double obj)
|
||||
{
|
||||
EXPNumber.Text = $"XP {(int)obj}/{Player.Stats.ExpToNextLevel.Value}";
|
||||
EXPNumber.Text = $"{(int)obj}/{Player.Stats.ExpToNextLevel.Value}";
|
||||
}
|
||||
private void ExpToNextLevel_Sync(int obj)
|
||||
{
|
||||
EXPNumber.Text = $"XP {Player.Stats.CurrentExp.Value}/{obj}";
|
||||
EXPNumber.Text = $"{Player.Stats.CurrentExp.Value}/{obj}";
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user