diff --git a/DungeonShooting_Godot/prefab/ui/RoomUI.tscn b/DungeonShooting_Godot/prefab/ui/RoomUI.tscn index 98b2ab6..8b7d59f 100644 --- a/DungeonShooting_Godot/prefab/ui/RoomUI.tscn +++ b/DungeonShooting_Godot/prefab/ui/RoomUI.tscn @@ -108,6 +108,8 @@ [node name="GlobalNode" type="Node" parent="."] -[node name="InteractiveTipBar" parent="GlobalNode" instance=ExtResource( 10 )] +[node name="ViewNode" type="Node" parent="."] -[node name="ReloadBar" parent="GlobalNode" instance=ExtResource( 3 )] +[node name="InteractiveTipBar" parent="ViewNode" instance=ExtResource( 10 )] + +[node name="ReloadBar" parent="ViewNode" instance=ExtResource( 3 )] diff --git a/DungeonShooting_Godot/prefab/ui/bar/InteractiveTipBar.tscn b/DungeonShooting_Godot/prefab/ui/bar/InteractiveTipBar.tscn index 37e2357..d4be339 100644 --- a/DungeonShooting_Godot/prefab/ui/bar/InteractiveTipBar.tscn +++ b/DungeonShooting_Godot/prefab/ui/bar/InteractiveTipBar.tscn @@ -1,10 +1,8 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://src/game/ui/InteractiveTipBar.cs" type="Script" id=1] [ext_resource path="res://resource/sprite/ui/keyboard/e.png" type="Texture" id=2] [ext_resource path="res://resource/sprite/ui/icon/icon_bullet.png" type="Texture" id=3] -[ext_resource path="res://resource/sprite/ui/font_bg.png" type="Texture" id=4] -[ext_resource path="res://resource/font/cn_font_12.tres" type="DynamicFont" id=5] [sub_resource type="Gradient" id=1] colors = PoolColorArray( 0.4, 0.498039, 1, 1, 0.4, 0.498039, 1, 0.313726 ) @@ -13,35 +11,16 @@ z_index = 10 script = ExtResource( 1 ) -[node name="Bg" type="Sprite" parent="."] -position = Vector2( 39, -68 ) -scale = Vector2( 78, 22 ) -texture = ExtResource( 4 ) - [node name="Icon" type="Sprite" parent="."] -position = Vector2( 1, -120 ) -scale = Vector2( 4, 4 ) +position = Vector2( 0, -25 ) texture = ExtResource( 3 ) -[node name="Message" type="Label" parent="."] -margin_left = -25.0 -margin_top = -90.0 -margin_right = 25.0 -margin_bottom = -68.0 -custom_colors/font_color = Color( 0, 0, 0, 1 ) -custom_fonts/font = ExtResource( 5 ) -text = "111111" -align = 1 -valign = 1 - [node name="InteractiveIcon" type="Sprite" parent="."] visible = false position = Vector2( 0, -30 ) -scale = Vector2( 4, 4 ) texture = ExtResource( 2 ) [node name="Line2D" type="Line2D" parent="."] -scale = Vector2( 4, 4 ) -points = PoolVector2Array( 0, -17, 0, 0 ) -width = 1.0 +points = PoolVector2Array( 0, -17, 0, -15.0938, 0, 0 ) +width = 2.0 gradient = SubResource( 1 ) diff --git a/DungeonShooting_Godot/prefab/ui/bar/ReloadBar.tscn b/DungeonShooting_Godot/prefab/ui/bar/ReloadBar.tscn index c7b4164..8e57894 100644 --- a/DungeonShooting_Godot/prefab/ui/bar/ReloadBar.tscn +++ b/DungeonShooting_Godot/prefab/ui/bar/ReloadBar.tscn @@ -5,7 +5,6 @@ [ext_resource path="res://resource/sprite/ui/reloadBar.png" type="Texture" id=3] [node name="ReloadBar" type="Node2D"] -scale = Vector2( 4, 4 ) script = ExtResource( 1 ) [node name="Slot" type="Sprite" parent="."] diff --git a/DungeonShooting_Godot/prefab/weapon/Weapon.tscn b/DungeonShooting_Godot/prefab/weapon/Weapon.tscn index 80de07d..10ec6dc 100644 --- a/DungeonShooting_Godot/prefab/weapon/Weapon.tscn +++ b/DungeonShooting_Godot/prefab/weapon/Weapon.tscn @@ -14,7 +14,6 @@ resource_name = "Floodlight" length = 3.0 loop = true -step = 0.5 tracks/0/type = "value" tracks/0/path = NodePath("../AnimatedSprite:material:shader_param/schedule") tracks/0/interp = 1 @@ -22,10 +21,10 @@ tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"times": PoolRealArray( 0, 2, 2.4, 2.5, 3 ), +"times": PoolRealArray( 0, 2.3, 2.6, 2.7, 3 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1 ), "update": 0, -"values": [ 0.0, 0.0, 1.0, 1.0, 0.0 ] +"values": [ 0.0, 0.0, 0.5, 0.4, 0.0 ] } [sub_resource type="Animation" id=4] diff --git a/DungeonShooting_Godot/src/game/role/Player.cs b/DungeonShooting_Godot/src/game/role/Player.cs index 4c629f2..3fdd3b7 100644 --- a/DungeonShooting_Godot/src/game/role/Player.cs +++ b/DungeonShooting_Godot/src/game/role/Player.cs @@ -123,11 +123,7 @@ var reloadBar = GameApplication.Instance.Ui.ReloadBar; if (Holster.ActiveWeapon != null && Holster.ActiveWeapon.Reloading) { - if (!reloadBar.Visible) - { - reloadBar.ShowBar(gPos); - } - reloadBar.UpdateProcess(1 - Holster.ActiveWeapon.ReloadProgress); + reloadBar.ShowBar(gPos, 1 - Holster.ActiveWeapon.ReloadProgress); } else { @@ -167,7 +163,7 @@ if (InteractiveItem is Weapon gun) { //显示互动提示 - GameApplication.Instance.Ui.InteractiveTipBar.ShowBar(result.Target, result.ShowIcon, result.Message); + GameApplication.Instance.Ui.InteractiveTipBar.ShowBar(result.Target, result.ShowIcon); } } } diff --git a/DungeonShooting_Godot/src/game/ui/InteractiveTipBar.cs b/DungeonShooting_Godot/src/game/ui/InteractiveTipBar.cs index 5bf48c4..ca7a3ba 100644 --- a/DungeonShooting_Godot/src/game/ui/InteractiveTipBar.cs +++ b/DungeonShooting_Godot/src/game/ui/InteractiveTipBar.cs @@ -8,17 +8,13 @@ private ActivityObject Target; - private Label Message; private Sprite Icon; - private Sprite Bg; private string currImage; public override void _Ready() { - Message = GetNode