Reload and player HUD
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dae1bs2yqqt5l"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://dae1bs2yqqt5l"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Player.cs" id="1_jsq3s"]
|
||||
[ext_resource type="Environment" uid="uid://c1i78mwq3ug2f" path="res://Scenes/Enivornment.tres" id="2_t03qe"]
|
||||
[ext_resource type="AudioStream" uid="uid://cupjwk5q538g2" path="res://Audio/SFX/gunshot.mp3" id="3_5mglu"]
|
||||
[ext_resource type="Script" path="res://Scripts/SoundEffects.cs" id="4_fmvkw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cc5emorildoar" path="res://Scenes/Gun.tscn" id="5_sb1dv"]
|
||||
[ext_resource type="Script" path="res://Scripts/Gun.cs" id="6_48ohb"]
|
||||
[ext_resource type="Script" path="res://Scripts/PlayerHUD.cs" id="6_pawgr"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_cxbex"]
|
||||
@@ -42,17 +43,20 @@ target_position = Vector3(0, 0, -1000)
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Pivot/Camera3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.10748, -0.0718701)
|
||||
stream = ExtResource("3_5mglu")
|
||||
volume_db = -28.0
|
||||
volume_db = -13.823
|
||||
max_db = -5.0
|
||||
max_polyphony = 8
|
||||
script = ExtResource("4_fmvkw")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
visible = false
|
||||
mesh = SubResource("CapsuleMesh_7dxig")
|
||||
|
||||
[node name="Gun" parent="." instance=ExtResource("5_sb1dv")]
|
||||
[node name="Gun" parent="." node_paths=PackedStringArray("_aimCast") instance=ExtResource("5_sb1dv")]
|
||||
script = ExtResource("6_48ohb")
|
||||
MaxAmmo = 30
|
||||
DamagePerHit = 8.0
|
||||
_aimCast = NodePath("../Pivot/Camera3D/AimCast")
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
script = ExtResource("6_pawgr")
|
||||
@@ -74,5 +78,6 @@ label_settings = SubResource("LabelSettings_3d4s1")
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[connection signal="FireGun" from="." to="Pivot/Camera3D/AudioStreamPlayer3D" method="OnFireGun"]
|
||||
[connection signal="FireGun" from="." to="CanvasLayer" method="OnFireGun"]
|
||||
[connection signal="FireGun" from="Gun" to="Pivot/Camera3D/AudioStreamPlayer3D" method="OnFireGun"]
|
||||
[connection signal="FireGun" from="Gun" to="CanvasLayer" method="UpdateCurrentAmmo"]
|
||||
[connection signal="ReloadGun" from="Gun" to="CanvasLayer" method="UpdateCurrentAmmo"]
|
||||
|
||||
Reference in New Issue
Block a user