diff --git a/Zennysoft.Game.Ma/global.json b/Zennysoft.Game.Ma/global.json deleted file mode 100644 index 585be974..00000000 --- a/Zennysoft.Game.Ma/global.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "sdk": { - "version": "8.0.400" - }, - "msbuild-sdks": { - "Godot.NET.Sdk": "4.4.0" - } -} \ No newline at end of file diff --git a/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml b/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml index 2a0f6da0..33157ae0 100644 --- a/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml +++ b/Zennysoft.Game.Ma/src/enemy/state/EnemyLogic.g.puml @@ -2,9 +2,9 @@ state "EnemyLogic State" as Zennysoft_Game_Ma_EnemyLogic_State { state "Alive" as Zennysoft_Game_Ma_EnemyLogic_State_Alive { state "Activated" as Zennysoft_Game_Ma_EnemyLogic_State_Activated { - state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling state "Attacking" as Zennysoft_Game_Ma_EnemyLogic_State_Attacking state "FollowPlayer" as Zennysoft_Game_Ma_EnemyLogic_State_FollowPlayer + state "Patrolling" as Zennysoft_Game_Ma_EnemyLogic_State_Patrolling } state "Idle" as Zennysoft_Game_Ma_EnemyLogic_State_Idle } diff --git a/Zennysoft.Game.Ma/src/map/dungeon/textures/MinimapTexture.tres b/Zennysoft.Game.Ma/src/map/dungeon/textures/MinimapTexture.tres index 03bb8c0a..f770abed 100644 --- a/Zennysoft.Game.Ma/src/map/dungeon/textures/MinimapTexture.tres +++ b/Zennysoft.Game.Ma/src/map/dungeon/textures/MinimapTexture.tres @@ -5,4 +5,4 @@ transparency = 1 depth_draw_mode = 1 shading_mode = 0 vertex_color_use_as_albedo = true -albedo_color = Color(1, 1, 1, 0.482353) +albedo_color = Color(0.929412, 0.454902, 0.117647, 0.843137) diff --git a/Zennysoft.Game.Ma/src/player/Player.tscn b/Zennysoft.Game.Ma/src/player/Player.tscn index 7d7f90b3..1adec7a9 100644 --- a/Zennysoft.Game.Ma/src/player/Player.tscn +++ b/Zennysoft.Game.Ma/src/player/Player.tscn @@ -571,6 +571,7 @@ axis = 1 texture = ExtResource("7_8hi2n") [node name="Collision" type="Node3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.301443, 0) [node name="Hitbox" type="Area3D" parent="Collision"] unique_name_in_owner = true diff --git a/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.cs b/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.cs index 2bfd43b0..04d66ffd 100644 --- a/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.cs +++ b/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.cs @@ -24,6 +24,13 @@ public partial class PlayerInfoUI : Control, IPlayerInfoUI [Node] public Label HPNumber { get; set; } = default!; [Node] public Label VTNumber { get; set; } = default!; + + [Node] public Label EXPNumber { get; set; } = default!; + + [Node] public ProgressBar HPProgressBar { get; set; } = default!; + + [Node] public ProgressBar VTProgressBar { get; set; } = default!; + #endregion [Dependency] public IPlayer Player => this.DependOn(); @@ -37,30 +44,45 @@ public partial class PlayerInfoUI : Control, IPlayerInfoUI Player.Stats.MaximumVT.Sync += MaximumVT_Sync; Player.Stats.CurrentLevel.Sync += CurrentLevel_Sync; + Player.Stats.CurrentExp.Sync += CurrentExp_Sync; + Player.Stats.ExpToNextLevel.Sync += ExpToNextLevel_Sync; } private void CurrentLevel_Sync(int obj) { - LevelNumber.Text = $"{obj}"; + LevelNumber.Text = $"LVL. {obj}"; } private void MaximumVT_Sync(int obj) { VTNumber.Text = $"{Player.Stats.CurrentVT.Value}/{obj}"; + VTProgressBar.MaxValue = obj; } private void CurrentVT_Sync(int obj) { VTNumber.Text = $"{obj}/{Player.Stats.MaximumVT.Value}"; + VTProgressBar.Value = obj; } private void MaximumHP_Sync(int obj) { HPNumber.Text = $"{Player.Stats.CurrentHP.Value}/{obj}"; + HPProgressBar.MaxValue = obj; } private void CurrentHP_Sync(int obj) { HPNumber.Text = $"{obj}/{Player.Stats.MaximumHP.Value}"; + HPProgressBar.Value = obj; + } + + private void CurrentExp_Sync(double obj) + { + EXPNumber.Text = $"XP {(int)obj}/{Player.Stats.ExpToNextLevel.Value}"; + } + private void ExpToNextLevel_Sync(int obj) + { + EXPNumber.Text = $"XP {Player.Stats.CurrentExp.Value}/{obj}"; } } diff --git a/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.tscn b/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.tscn index 17ee486e..4983dd74 100644 --- a/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.tscn +++ b/Zennysoft.Game.Ma/src/ui/player_ui/PlayerInfoUI.tscn @@ -1,9 +1,31 @@ -[gd_scene load_steps=4 format=3 uid="uid://dxl8il8f13c2x"] +[gd_scene load_steps=8 format=3 uid="uid://dxl8il8f13c2x"] [ext_resource type="Script" uid="uid://b65cbirtijlii" path="res://src/ui/player_ui/PlayerInfoUI.cs" id="1_d8yyu"] [ext_resource type="LabelSettings" uid="uid://ca1q6yu8blwxf" path="res://src/ui/label_settings/InventoryMainTextBold.tres" id="2_aa7fx"] [ext_resource type="LabelSettings" uid="uid://dupifadnagodp" path="res://src/ui/label_settings/MainTextRegular.tres" id="3_xdjh1"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bqtin"] +bg_color = Color(0.00392157, 0.341176, 0.141176, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hkw8m"] +bg_color = Color(0.207843, 1, 0.52549, 1) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color(0.00392157, 0.341176, 0.141176, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nv5jb"] +bg_color = Color(0.0980392, 0.129412, 0.270588, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gio7f"] +bg_color = Color(0.223529, 0.368627, 0.996078, 1) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color(0.0980392, 0.129412, 0.270588, 1) + [node name="PlayerInfoUI" type="Control"] layout_mode = 3 anchors_preset = 15 @@ -51,9 +73,21 @@ border_width = 0.0 [node name="HPNumber" type="Label" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/HP Box"] unique_name_in_owner = true +custom_minimum_size = Vector2(160, 0) layout_mode = 2 text = "222/222" label_settings = ExtResource("3_xdjh1") +horizontal_alignment = 2 + +[node name="HPProgressBar" type="ProgressBar" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/HP Box"] +unique_name_in_owner = true +custom_minimum_size = Vector2(150, 12) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_styles/background = SubResource("StyleBoxFlat_bqtin") +theme_override_styles/fill = SubResource("StyleBoxFlat_hkw8m") +value = 50.0 +show_percentage = false [node name="VT Box" type="HBoxContainer" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox"] layout_mode = 2 @@ -70,9 +104,21 @@ border_width = 0.0 [node name="VTNumber" type="Label" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/VT Box"] unique_name_in_owner = true +custom_minimum_size = Vector2(160, 0) layout_mode = 2 text = "444/444" label_settings = ExtResource("3_xdjh1") +horizontal_alignment = 2 + +[node name="VTProgressBar" type="ProgressBar" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox/VT Box"] +unique_name_in_owner = true +custom_minimum_size = Vector2(150, 12) +layout_mode = 2 +size_flags_vertical = 4 +theme_override_styles/background = SubResource("StyleBoxFlat_nv5jb") +theme_override_styles/fill = SubResource("StyleBoxFlat_gio7f") +value = 50.0 +show_percentage = false [node name="Level Box" type="HBoxContainer" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox"] layout_mode = 2 @@ -82,8 +128,7 @@ unique_name_in_owner = true layout_mode = 2 text = "LVL. 08" label_settings = ExtResource("2_aa7fx") -horizontal_alignment = 1 -vertical_alignment = 1 +horizontal_alignment = 2 [node name="EXP Box" type="HBoxContainer" parent="AspectRatio/PlayerInfo/HBoxContainer/VBox"] layout_mode = 2 @@ -93,5 +138,4 @@ unique_name_in_owner = true layout_mode = 2 text = "XP 901/2002" label_settings = ExtResource("2_aa7fx") -horizontal_alignment = 1 -vertical_alignment = 1 +horizontal_alignment = 2