Fixed HUD texture bad reference.
This commit is contained in:
parent
ef0ef825ac
commit
8385095bab
2 changed files with 128 additions and 124 deletions
|
@ -1,9 +1,11 @@
|
||||||
[gd_scene load_steps=8 format=2]
|
[gd_scene load_steps=10 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Assets/HUD/HeathBarEmpty.svg" type="Texture" id=1]
|
[ext_resource path="res://Assets/HUD/HeathBarEmpty.svg" type="Texture" id=1]
|
||||||
[ext_resource path="res://Assets/HUD/HealthBarProgress.svg" type="Texture" id=2]
|
[ext_resource path="res://Assets/HUD/HealthBarProgress.svg" type="Texture" id=2]
|
||||||
[ext_resource path="res://Assets/HUD/HealthBarUnder.svg" type="Texture" id=3]
|
[ext_resource path="res://Assets/HUD/HealthBarUnder.svg" type="Texture" id=3]
|
||||||
[ext_resource path="res://Assets/HUD/Panel.svg" type="Texture" id=4]
|
[ext_resource path="res://Assets/HUD/Panel.svg" type="Texture" id=4]
|
||||||
|
[ext_resource path="res://GUI/HitConfirmation.gd" type="Script" id=5]
|
||||||
|
[ext_resource path="res://Assets/SFX/UI-HitConfirmation.wav" type="AudioStream" id=6]
|
||||||
|
|
||||||
[sub_resource type="VisualShaderNodeColorConstant" id=1]
|
[sub_resource type="VisualShaderNodeColorConstant" id=1]
|
||||||
constant = Color( 0, 0, 0, 0.176471 )
|
constant = Color( 0, 0, 0, 0.176471 )
|
||||||
|
@ -157,3 +159,124 @@ valign = 1
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="Crosshair" type="CenterContainer" parent="."]
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
margin_left = -511.401
|
||||||
|
margin_top = -301.225
|
||||||
|
margin_right = 512.599
|
||||||
|
margin_bottom = 298.775
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="CrosshairCenter" type="Control" parent="Crosshair"]
|
||||||
|
margin_left = 512.0
|
||||||
|
margin_top = 300.0
|
||||||
|
margin_right = 512.0
|
||||||
|
margin_bottom = 300.0
|
||||||
|
|
||||||
|
[node name="Line1" type="ColorRect" parent="Crosshair/CrosshairCenter"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 20.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Line2" type="ColorRect" parent="Crosshair/CrosshairCenter"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 20.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = 90.0
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Line3" type="ColorRect" parent="Crosshair/CrosshairCenter"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 20.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = 180.0
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Line4" type="ColorRect" parent="Crosshair/CrosshairCenter"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 20.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = -90.0
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="HitConfirmation" type="Control" parent="Crosshair"]
|
||||||
|
light_mask = -2147483647
|
||||||
|
margin_left = 512.0
|
||||||
|
margin_top = 300.0
|
||||||
|
margin_right = 512.0
|
||||||
|
margin_bottom = 300.0
|
||||||
|
script = ExtResource( 5 )
|
||||||
|
|
||||||
|
[node name="HitConfirmationSound" type="AudioStreamPlayer" parent="Crosshair/HitConfirmation"]
|
||||||
|
stream = ExtResource( 6 )
|
||||||
|
|
||||||
|
[node name="Line1" type="ColorRect" parent="Crosshair/HitConfirmation"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = 45.3067
|
||||||
|
rect_scale = Vector2( 1, 0.5 )
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Line2" type="ColorRect" parent="Crosshair/HitConfirmation"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = 135.307
|
||||||
|
rect_scale = Vector2( 1, 0.5 )
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Line3" type="ColorRect" parent="Crosshair/HitConfirmation"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = 225.306
|
||||||
|
rect_scale = Vector2( 1, 0.5 )
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[node name="Line4" type="ColorRect" parent="Crosshair/HitConfirmation"]
|
||||||
|
margin_left = 8.0
|
||||||
|
margin_top = -1.0
|
||||||
|
margin_right = 16.0
|
||||||
|
margin_bottom = 1.0
|
||||||
|
rect_rotation = -44.6931
|
||||||
|
rect_scale = Vector2( 1, 0.5 )
|
||||||
|
rect_pivot_offset = Vector2( -8, 1 )
|
||||||
|
__meta__ = {
|
||||||
|
"_edit_use_anchors_": false
|
||||||
|
}
|
||||||
|
|
127
Player.tscn
127
Player.tscn
|
@ -1,11 +1,10 @@
|
||||||
[gd_scene load_steps=10 format=2]
|
[gd_scene load_steps=9 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://Player.gd" type="Script" id=1]
|
[ext_resource path="res://Player.gd" type="Script" id=1]
|
||||||
[ext_resource path="res://Assets/Weapons/Handgun/Handgun.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://Assets/Weapons/Handgun/Handgun.tscn" type="PackedScene" id=2]
|
||||||
[ext_resource path="res://Assets/SFX/UI-HitConfirmation.wav" type="AudioStream" id=3]
|
[ext_resource path="res://Assets/HUD/HUD.tscn" type="PackedScene" id=3]
|
||||||
[ext_resource path="res://Assets/Player/Player.gltf" type="PackedScene" id=4]
|
[ext_resource path="res://Assets/Player/Player.gltf" type="PackedScene" id=4]
|
||||||
[ext_resource path="res://Audio/SoundPlayer.tscn" type="PackedScene" id=7]
|
[ext_resource path="res://Audio/SoundPlayer.tscn" type="PackedScene" id=7]
|
||||||
[ext_resource path="res://GUI/HitConfirmation.gd" type="Script" id=8]
|
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape" id=1]
|
[sub_resource type="CapsuleShape" id=1]
|
||||||
radius = 0.33
|
radius = 0.33
|
||||||
|
@ -40,6 +39,7 @@ shape = SubResource( 2 )
|
||||||
|
|
||||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||||
transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0.882822, 0 )
|
transform = Transform( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0.882822, 0 )
|
||||||
|
visible = false
|
||||||
mesh = SubResource( 3 )
|
mesh = SubResource( 3 )
|
||||||
material/0 = null
|
material/0 = null
|
||||||
|
|
||||||
|
@ -71,126 +71,7 @@ MinDelay = 0.2
|
||||||
SoundClip = "res://Assets/SFX/Player-Pain-01.wav"
|
SoundClip = "res://Assets/SFX/Player-Pain-01.wav"
|
||||||
MinDelay = 0.2
|
MinDelay = 0.2
|
||||||
|
|
||||||
[node name="CrosshairContainer" type="CenterContainer" parent="."]
|
[node name="HUD" parent="." instance=ExtResource( 3 )]
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
margin_left = -511.401
|
|
||||||
margin_top = -301.225
|
|
||||||
margin_right = 512.599
|
|
||||||
margin_bottom = 298.775
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="CrosshairCenter" type="Control" parent="CrosshairContainer"]
|
|
||||||
margin_left = 512.0
|
|
||||||
margin_top = 300.0
|
|
||||||
margin_right = 512.0
|
|
||||||
margin_bottom = 300.0
|
|
||||||
|
|
||||||
[node name="Line1" type="ColorRect" parent="CrosshairContainer/CrosshairCenter"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 20.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Line2" type="ColorRect" parent="CrosshairContainer/CrosshairCenter"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 20.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = 90.0
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Line3" type="ColorRect" parent="CrosshairContainer/CrosshairCenter"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 20.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = 180.0
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Line4" type="ColorRect" parent="CrosshairContainer/CrosshairCenter"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 20.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = -90.0
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="HitConfirmation" type="Control" parent="CrosshairContainer"]
|
|
||||||
light_mask = -2147483647
|
|
||||||
margin_left = 512.0
|
|
||||||
margin_top = 300.0
|
|
||||||
margin_right = 512.0
|
|
||||||
margin_bottom = 300.0
|
|
||||||
script = ExtResource( 8 )
|
|
||||||
|
|
||||||
[node name="HitConfirmationSound" type="AudioStreamPlayer" parent="CrosshairContainer/HitConfirmation"]
|
|
||||||
stream = ExtResource( 3 )
|
|
||||||
|
|
||||||
[node name="Line1" type="ColorRect" parent="CrosshairContainer/HitConfirmation"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 16.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = 45.3067
|
|
||||||
rect_scale = Vector2( 1, 0.5 )
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Line2" type="ColorRect" parent="CrosshairContainer/HitConfirmation"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 16.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = 135.307
|
|
||||||
rect_scale = Vector2( 1, 0.5 )
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Line3" type="ColorRect" parent="CrosshairContainer/HitConfirmation"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 16.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = 225.306
|
|
||||||
rect_scale = Vector2( 1, 0.5 )
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Line4" type="ColorRect" parent="CrosshairContainer/HitConfirmation"]
|
|
||||||
margin_left = 8.0
|
|
||||||
margin_top = -1.0
|
|
||||||
margin_right = 16.0
|
|
||||||
margin_bottom = 1.0
|
|
||||||
rect_rotation = -44.6931
|
|
||||||
rect_scale = Vector2( 1, 0.5 )
|
|
||||||
rect_pivot_offset = Vector2( -8, 1 )
|
|
||||||
__meta__ = {
|
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource( 4 )]
|
[node name="Player" parent="." instance=ExtResource( 4 )]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
Reference in a new issue