flag refactoring

This commit is contained in:
anyreso 2024-05-09 01:17:10 -04:00
parent 69c8b65093
commit 6ba368c76e
21 changed files with 389 additions and 198 deletions

View file

@ -12,51 +12,43 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
## This component allows its entity to interact with flags
class_name FlagCarryComponent extends Node3D
## This component allows its entity to grab, carry and throw flags
##
## To work correctly the owner MUST set an attachment point for carried flags
## and a sensor to detect when flags are within grab range
@export var max_throw_speed : float = 10.0
@export var sensor : Area3D
@export var carrier : Player
@export var mesh : Node3D
var _carried_flag : Flag
func _ready() -> void:
sensor.body_entered.connect(_sensor_on_body_entered)
func _physics_process(_delta : float) -> void:
func _process(_delta : float) -> void:
if _is_carrying():
_carried_flag.global_position = global_position
_carried_flag.global_rotation = global_rotation
func _grab(flag : Flag) -> void:
if not _is_carrying():
flag.grab(carrier)
_carried_flag = flag
show()
func _release(inherited_velocity : Vector3, throw_speed : float, dropper : Player) -> void:
if _is_carrying():
_carried_flag.drop(dropper)
_carried_flag.rotation_degrees.x = 0.0
_carried_flag.linear_velocity = inherited_velocity + (global_basis.z * throw_speed)
# Throw the flag from some distance in front of the player to avoid regrabbing mid-air
_carried_flag.global_position = carrier.global_position + (global_basis.z * 1.7)
_carried_flag = null
hide()
_carried_flag.global_rotation = Vector3(.0, global_rotation.y, .0)
func _is_carrying() -> bool:
return _carried_flag != null
func _sensor_on_body_entered(collider : Flag) -> void:
if collider is Flag:
_grab(collider)
func grab(flag : Flag) -> void:
if not _is_carrying():
flag.grabbed.emit(owner)
_carried_flag = flag
show()
func drop(dropper : Player) -> void:
_release(Vector3.ZERO, 0.0, dropper)
func throw(inherited_velocity : Vector3, dropper : Player) -> void:
_release(inherited_velocity, max_throw_speed, dropper)
func _release(inherited_velocity : Vector3, throw_speed : float, dropper : Player) -> void:
if not _is_carrying():
return
# update carried flag global rotation based on component global rotation
_carried_flag.global_rotation = Vector3(.0, global_rotation.y, .0)
_carried_flag.linear_velocity = inherited_velocity + (global_basis.z * throw_speed)
# Throw the flag from some distance in front of the player to avoid regrabbing mid-air
_carried_flag.global_position = owner.global_position + (global_basis.z * 1.7)
_carried_flag.dropped.emit(dropper)
_carried_flag = null
hide()

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=5 format=3 uid="uid://dpnu1lvfncx6q"]
[ext_resource type="Script" path="res://entities/dummy_target/dummy_target.gd" id="1_iup5v"]
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://entities/player/collision_shape.tres" id="2_i5k5j"]
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://entities/player/resources/collider.tres" id="2_i5k5j"]
[ext_resource type="PackedScene" uid="uid://chuein4frnvwt" path="res://entities/dummy_target/assets/player_mesh.glb" id="4_fuync"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_b0142"]

Binary file not shown.

View file

@ -12,34 +12,39 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name Flag extends Node3D
enum FlagState { FLAG_STATE_ON_STAND, FLAG_STATE_DROPPED, FLAG_STATE_TAKEN }
@export var flag_state : FlagState = FlagState.FLAG_STATE_ON_STAND
class_name Flag extends RigidBody3D
signal grabbed(grabber : Player)
signal regrabbed(grabber : Player)
signal dropped(dropper : Player)
enum FlagState { ON_STAND, DROPPED, TAKEN }
@export var state : FlagState = FlagState.ON_STAND
@onready var area : Area3D = $GripArea3D
@onready var mesh : Node3D = $Mesh
var last_carrier : Player = null
@onready var _mesh : Node = $Smoothing/Mesh
func can_be_grabbed() -> bool:
return flag_state != FlagState.FLAG_STATE_TAKEN
func _ready() -> void:
area.body_entered.connect(_on_body_entered)
func grab(grabber : Player) -> void:
if flag_state != FlagState.FLAG_STATE_TAKEN:
_mesh.hide()
flag_state = FlagState.FLAG_STATE_TAKEN
func _on_grabbed(grabber : Player) -> void:
if state != FlagState.TAKEN:
hide()
state = FlagState.TAKEN
if (last_carrier == null) or (grabber != last_carrier):
grabbed.emit(grabber)
last_carrier = grabber
else:
regrabbed.emit(grabber)
func drop(dropper : Player) -> void:
if flag_state == FlagState.FLAG_STATE_TAKEN:
_mesh.show()
flag_state = FlagState.FLAG_STATE_DROPPED
dropped.emit(dropper)
func _on_dropped(_dropper : Player) -> void:
if state == FlagState.TAKEN:
show()
state = FlagState.DROPPED
func _on_body_entered(body: Node) -> void:
if body is Player:
assert(body.flag_carry_component)
body.flag_carry_component.grab(self)

View file

@ -1,17 +1,15 @@
[gd_scene load_steps=8 format=3 uid="uid://c88l3h0ph00c7"]
[ext_resource type="Script" path="res://entities/flag/flag.gd" id="1_y7d3d"]
[ext_resource type="Script" path="res://addons/smoothing/smoothing.gd" id="2_es4ce"]
[ext_resource type="PackedScene" uid="uid://d3l7fvbdg6m5g" path="res://entities/flag/assets/flag.glb" id="2_i78em"]
[ext_resource type="PackedScene" uid="uid://bcgkc5fhhyauv" path="res://entities/flag/waypoint.tscn" id="3_tu6jg"]
[ext_resource type="Shape3D" uid="uid://dfko4x6uq27q" path="res://entities/flag/resources/collider.tres" id="2_kx0v0"]
[ext_resource type="Shape3D" uid="uid://b5a6oybteqj6n" path="res://entities/flag/resources/grip_area.tres" id="3_uhsc8"]
[ext_resource type="PackedScene" uid="uid://2350a3ce4xs8" path="res://interfaces/waypoint/waypoint3d.tscn" id="4_y8nj0"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_4ymrw"]
friction = 0.5
bounce = 0.5
[sub_resource type="BoxShape3D" id="BoxShape3D_fkf1k"]
size = Vector3(0.5, 2.33994, 0.5)
[sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_lpijf"]
properties/0/path = NodePath(".:position")
properties/0/spawn = true
@ -19,10 +17,10 @@ properties/0/replication_mode = 1
properties/1/path = NodePath(".:linear_velocity")
properties/1/spawn = true
properties/1/replication_mode = 1
properties/2/path = NodePath(".:flag_state")
properties/2/path = NodePath("Smoothing/Mesh:visible")
properties/2/spawn = true
properties/2/replication_mode = 2
properties/3/path = NodePath("Smoothing/Mesh:visible")
properties/3/path = NodePath("Flag:state")
properties/3/spawn = true
properties/3/replication_mode = 2
@ -40,20 +38,23 @@ continuous_cd = true
script = ExtResource("1_y7d3d")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.175, 0)
shape = SubResource("BoxShape3D_fkf1k")
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0.00601196)
shape = ExtResource("2_kx0v0")
[node name="GripArea3D" type="Area3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="GripArea3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = ExtResource("3_uhsc8")
[node name="Mesh" parent="." instance=ExtResource("2_i78em")]
[node name="Waypoint" parent="." instance=ExtResource("4_y8nj0")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.25, 0)
foreground_color = Color(0, 0.75, 0.75, 1)
[node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."]
replication_config = SubResource("SceneReplicationConfig_lpijf")
[node name="Smoothing" type="Node3D" parent="."]
script = ExtResource("2_es4ce")
[node name="WaypointAttachment" type="Marker3D" parent="Smoothing"]
[node name="Waypoint" parent="Smoothing/WaypointAttachment" node_paths=PackedStringArray("attach_point", "flag") instance=ExtResource("3_tu6jg")]
attach_point = NodePath("..")
flag = NodePath("../../..")
[node name="Mesh" parent="Smoothing" instance=ExtResource("2_i78em")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0.0744106, 0)
[connection signal="dropped" from="." to="." method="_on_dropped"]
[connection signal="grabbed" from="." to="." method="_on_grabbed"]

View file

@ -0,0 +1,4 @@
[gd_resource type="BoxShape3D" format=3 uid="uid://dfko4x6uq27q"]
[resource]
size = Vector3(0.5, 2, 0.164246)

View file

@ -0,0 +1,4 @@
[gd_resource type="BoxShape3D" format=3 uid="uid://b5a6oybteqj6n"]
[resource]
size = Vector3(0.5, 2, 0.5)

View file

@ -1,52 +0,0 @@
# This file is part of open-fpsz.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
extends Control
@export var attach_point : Node3D
@export var flag : Flag
@onready var _iff_container : Control = $IFFContainer
func _ready() -> void:
attach_point.transform = attach_point.transform.translated(
Vector3(0, flag.get_node("CollisionShape3D").shape.size.y, 0))
func _process(_delta : float) -> void:
# disable waypoint repositioning when running headless
if DisplayServer.get_name() == "headless":
set_process(false)
return
# repositon iff on viewport
var camera : Camera3D = get_viewport().get_camera_3d()
var viewport_rect : Rect2 = get_viewport_rect()
# if the player is NOT infront of the camera or camera does NOT have LOS to player
if camera.is_position_behind(attach_point.global_position):
_iff_container.hide() # hide the IFF and exit function
return
else:
_iff_container.show() # display the IFF
# get the screen location of the players head
var new_iff_position : Vector2 = camera.unproject_position(attach_point.global_position)
# check if the unprojected point lies inside the viewport
if !Rect2(Vector2(0, 0), viewport_rect.size).has_point(new_iff_position):
_iff_container.hide() # hide the IFF and exit function
return
# move the IFF up so the bottom of it is at the players head
new_iff_position.y -= _iff_container.size.y
# move the IFF left so it's centered horizontally above players head
new_iff_position.x -= _iff_container.size.x / 2
# set the position of the IFF
position = new_iff_position

View file

@ -1,27 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://bcgkc5fhhyauv"]
[ext_resource type="Script" path="res://entities/flag/waypoint.gd" id="1_gmnl6"]
[node name="IFF" type="Control"]
layout_mode = 3
anchors_preset = 0
script = ExtResource("1_gmnl6")
[node name="IFFContainer" type="MarginContainer" parent="."]
layout_mode = 0
offset_right = 11.0
offset_bottom = 20.0
mouse_filter = 2
[node name="Chevron" type="Label" parent="IFFContainer"]
layout_direction = 2
layout_mode = 2
size_flags_vertical = 1
theme_override_colors/font_color = Color(0, 1, 1, 0.784314)
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
theme_override_constants/line_spacing = -20
theme_override_font_sizes/font_size = 14
text = "▼"
horizontal_alignment = 1
vertical_alignment = 2

View file

@ -18,6 +18,7 @@ enum PlayerState { PLAYER_ALIVE, PLAYER_DEAD }
@export var iff : Control
@export var health_component : HealthComponent
@export var flag_carry_component : FlagCarryComponent
@export var walkable_surface_sensor : ShapeCast3D
## The inventory component can store up to [member Inventory.slots] objects. It
@ -49,7 +50,6 @@ enum PlayerState { PLAYER_ALIVE, PLAYER_DEAD }
@onready var hud : CanvasLayer = $HUD
@onready var animation_player : AnimationPlayer = $AnimationPlayer
@onready var collision_shape : CollisionShape3D = $CollisionShape3D
@onready var flag_carry_component : FlagCarryComponent = %Pivot/FlagCarryComponent
@onready var jetpack_particles : Array = $Smoothing/ThirdPerson/Mesh/JetpackFX.get_children()
@onready var match_participant_component : MatchParticipantComponent = $MatchParticipantComponent
@ -65,7 +65,6 @@ static var pawn_player : Player
func _ready() -> void:
match_participant_component.player_id_changed.connect(_setup_pawn)
match_participant_component.player_id_changed.connect(input.update_multiplayer_authority)
match_participant_component.nickname_changed.connect(iff.set_nickname)
health_component.health_changed.connect(hud._on_health_changed)
health_component.health_changed.connect(iff._on_health_changed)
health_component.health_changed.emit(health_component.health)

View file

@ -1,8 +1,8 @@
[gd_scene load_steps=45 format=3 uid="uid://cbhx1xme0sb7k"]
[ext_resource type="Script" path="res://entities/player/player.gd" id="1_mk68k"]
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://entities/player/collision_shape.tres" id="2_vjqny"]
[ext_resource type="PackedScene" uid="uid://bcv81ku26xo" path="res://interfaces/hud/hud.tscn" id="3_ccety"]
[ext_resource type="Shape3D" uid="uid://cb8esdlnottdn" path="res://entities/player/resources/collider.tres" id="4_8kvcy"]
[ext_resource type="Script" path="res://entities/components/match_participant_component.gd" id="6_lrose"]
[ext_resource type="Script" path="res://entities/player/player_input.gd" id="6_ymcrr"]
[ext_resource type="PackedScene" uid="uid://dsysi2rd3bu76" path="res://interfaces/hud/iffs/iff.tscn" id="7_8hc80"]
@ -206,8 +206,9 @@ particles_anim_loop = false
[sub_resource type="QuadMesh" id="QuadMesh_uc7ts"]
material = SubResource("StandardMaterial3D_2jwv2")
[node name="Player" type="RigidBody3D" node_paths=PackedStringArray("iff", "health_component", "walkable_surface_sensor", "inventory", "tp_mesh") groups=["Player"]]
[node name="Player" type="RigidBody3D" node_paths=PackedStringArray("iff", "health_component", "flag_carry_component", "walkable_surface_sensor", "inventory", "tp_mesh") groups=["Player"]]
collision_mask = 2147483649
collision_priority = 9.0
axis_lock_angular_x = true
axis_lock_angular_y = true
axis_lock_angular_z = true
@ -216,27 +217,20 @@ physics_material_override = SubResource("PhysicsMaterial_clur0")
can_sleep = false
continuous_cd = true
script = ExtResource("1_mk68k")
iff = NodePath("Smoothing/ThirdPerson/IFF")
iff = NodePath("Smoothing/ThirdPerson/IFFAttachment/IFF")
health_component = NodePath("HealthComponent")
flag_carry_component = NodePath("Pivot/FlagCarryComponent")
walkable_surface_sensor = NodePath("WalkableSurfaceSensor")
inventory = NodePath("Pivot/Inventory")
tp_mesh = NodePath("Smoothing/ThirdPerson/Mesh")
jump_height = 1.5
[node name="Sensor" type="Area3D" parent="."]
collision_layer = 0
collision_mask = 8
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="Sensor"]
shape = ExtResource("2_vjqny")
[node name="HealthComponent" type="Area3D" parent="." node_paths=PackedStringArray("match_participant_component")]
script = ExtResource("14_ctgxn")
match_participant_component = NodePath("../MatchParticipantComponent")
[node name="CollisionShape3D" type="CollisionShape3D" parent="HealthComponent"]
shape = ExtResource("2_vjqny")
shape = ExtResource("4_8kvcy")
[node name="WalkableSurfaceSensor" type="ShapeCast3D" parent="."]
transform = Transform3D(1.05, 0, 0, 0, 1.05, 0, 0, 0, 1.05, 0, -0.85, 0)
@ -245,7 +239,7 @@ target_position = Vector3(0, 0, 0)
collision_mask = 2147483648
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = ExtResource("2_vjqny")
shape = ExtResource("4_8kvcy")
[node name="HUD" parent="." instance=ExtResource("3_ccety")]
@ -295,19 +289,17 @@ visible = false
[node name="GrenadeLauncher" parent="Pivot/Inventory" instance=ExtResource("16_4xs2j")]
visible = false
[node name="FlagCarryComponent" type="Node3D" parent="Pivot" node_paths=PackedStringArray("sensor", "carrier")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
visible = false
script = ExtResource("8_pdfbn")
sensor = NodePath("../../Sensor")
carrier = NodePath("../..")
[node name="FlagMesh" parent="Pivot/FlagCarryComponent" instance=ExtResource("18_7nkei")]
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1.559e-08, -0.462981, -0.178329)
[node name="SpineIKTarget" type="Marker3D" parent="Pivot"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0)
[node name="FlagCarryComponent" type="Node3D" parent="Pivot" node_paths=PackedStringArray("mesh")]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, -0.25, 0.377972)
visible = false
script = ExtResource("8_pdfbn")
mesh = NodePath("FlagMesh")
[node name="FlagMesh" parent="Pivot/FlagCarryComponent" instance=ExtResource("18_7nkei")]
[node name="Smoothing" type="Node3D" parent="."]
script = ExtResource("11_k330l")
target = NodePath("..")
@ -329,7 +321,6 @@ bones/6/rotation = Quaternion(0.160951, 0.00623474, 0.0096637, 0.986895)
bones/8/rotation = Quaternion(0.675761, -0.399581, 0.409695, 0.464577)
bones/10/rotation = Quaternion(0.212344, -0.0870591, -0.287653, 0.929831)
bones/12/rotation = Quaternion(0.0811501, 0.206806, -0.754068, 0.618084)
bones/14/position = Vector3(-0.074525, 0.220475, 0.075475)
bones/14/rotation = Quaternion(0.00943715, 0.0971687, -0.145046, 0.984597)
bones/20/rotation = Quaternion(-0.123455, 0.0248346, 0.23344, 0.964183)
bones/24/rotation = Quaternion(0.0450683, -0.000817796, 0.0508488, 0.997689)
@ -347,9 +338,8 @@ bones/56/rotation = Quaternion(-0.0254885, 0.0439755, -0.00910637, 0.998666)
bones/58/rotation = Quaternion(-0.0119802, 0.289956, -0.0527053, 0.955513)
bones/62/rotation = Quaternion(0.689943, 0.375565, -0.410267, 0.463261)
bones/64/rotation = Quaternion(0.337746, -0.290519, 0.159479, 0.880961)
bones/66/position = Vector3(0.055475, 0.231475, 0.000474975)
bones/66/rotation = Quaternion(0.540371, -0.580679, 0.406779, 0.453147)
bones/68/position = Vector3(-0.014525, 0.270475, -0.054525)
bones/68/position = Vector3(-1.77636e-17, 0.240718, 0)
bones/68/rotation = Quaternion(0.0150529, -0.289001, 0.0720108, 0.954498)
bones/70/rotation = Quaternion(0.155965, 0.0109114, -0.00107202, 0.987702)
bones/72/rotation = Quaternion(0.563923, 4.19095e-08, -0.0577906, 0.823803)
@ -376,7 +366,7 @@ bones/124/rotation = Quaternion(0.417677, -0.0431149, 0.00625689, 0.90755)
bones/126/rotation = Quaternion(0.397818, -0.0427722, -0.00601182, 0.916447)
[node name="HandAttachment" parent="Smoothing/ThirdPerson/Mesh/Node/Skeleton3D" index="0"]
transform = Transform3D(-0.152214, 0.0548832, 0.986823, 0.933991, 0.334546, 0.125459, -0.323252, 0.94078, -0.102183, -0.191759, 1.06335, 0.0698007)
transform = Transform3D(-0.152214, 0.0548832, 0.986823, 0.933991, 0.334546, 0.125459, -0.323252, 0.94078, -0.102183, -0.261612, 1.14328, 0.0896011)
[node name="grip" parent="Smoothing/ThirdPerson/Mesh/Node/Skeleton3D/HandAttachment/SpaceGun/Mesh/Armature/Skeleton3D" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.84217e-14, 1.19209e-07, 2.38419e-07)
@ -400,7 +390,13 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.692504, 1.30946)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.692504, 1.30946)
[node name="Barrels" parent="Smoothing/ThirdPerson/Mesh/Node/Skeleton3D/HandAttachment/ChainGun" index="3"]
transform = Transform3D(-1, 0, 8.9407e-08, 8.47504e-08, 0, 1, 0, 1, -3.72529e-09, 0, -2.38419e-07, -0.55315)
transform = Transform3D(-1, -1.49012e-08, 8.801e-08, 8.19564e-08, -3.72529e-09, 1, 0, 1, -7.45058e-09, 5.96046e-08, 0, -0.55315)
[node name="Skeleton3D" parent="Smoothing/ThirdPerson/Mesh/Node/Skeleton3D/HandAttachment/GrenadeLauncher/Armature" index="0"]
bones/0/rotation = Quaternion(0, 0.707107, 0.707107, 0)
bones/1/rotation = Quaternion(0, 0.707107, 0.707107, 0)
bones/2/rotation = Quaternion(0, 0.707107, 0.707107, 0)
bones/3/rotation = Quaternion(0, 0.707107, 0.707107, 0)
[node name="barrel" parent="Smoothing/ThirdPerson/Mesh/Node/Skeleton3D/HandAttachment/GrenadeLauncher/Armature/Skeleton3D" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.19209e-07, 0)
@ -443,11 +439,13 @@ draw_pass_1 = SubResource("QuadMesh_uc7ts")
[node name="IFFAttachment" type="Marker3D" parent="Smoothing/ThirdPerson"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.27457, 0)
visible = false
[node name="IFF" parent="Smoothing/ThirdPerson" node_paths=PackedStringArray("player", "match_participant_component", "attach_point") instance=ExtResource("7_8hc80")]
player = NodePath("../../..")
match_participant_component = NodePath("../../../MatchParticipantComponent")
attach_point = NodePath("../IFFAttachment")
[node name="IFF" parent="Smoothing/ThirdPerson/IFFAttachment" node_paths=PackedStringArray("player", "match_participant_component", "attach_point") instance=ExtResource("7_8hc80")]
visible = false
player = NodePath("../../../..")
match_participant_component = NodePath("../../../../MatchParticipantComponent")
attach_point = NodePath("..")
[connection signal="energy_changed" from="." to="HUD" method="_on_player_energy_changed"]