Minor method renaming

This commit is contained in:
Squinty 2024-04-19 00:14:13 +02:00
parent 4d35426dc8
commit 09880cc957

View file

@ -62,7 +62,7 @@ var _jumping = false
func _ready():
energy_changed.connect(hud._on_energy_changed)
if _is_first_person():
if _is_pawn():
health_component.health_changed.connect(hud._on_health_changed)
camera.current = true
camera.fov = _game_settings.fov
@ -79,7 +79,7 @@ func _ready():
input.jumped.connect(_jump)
input.throwed_flag.connect(_throw_flag)
func _is_first_person():
func _is_pawn():
return player_id == multiplayer.get_unique_id()
func _fire_primary():
@ -91,7 +91,7 @@ func _fire_primary():
weapon.transform = _original_weapon_transform
weapon.fire_primary()
weapon.transform = current_weapon_transform
if _is_first_person():
if _is_pawn():
animation_player.stop()
animation_player.play("shoot")
@ -137,7 +137,7 @@ func _process(_delta):
return
else:
iff.show()
if not _is_first_person():
if not _is_pawn():
$ThirdPerson/PlayerMesh.global_transform.basis = Basis.from_euler(Vector3(0.0, input.camera_rotation.x + PI, 0.0))
else:
if animation_player.current_animation == "shoot":
@ -189,7 +189,7 @@ func _integrate_forces(_state):
_jumping = false
func _update_third_person_animations():
if _is_first_person():
if _is_pawn():
return
var tp_player : Vanguard = $ThirdPerson/PlayerMesh
@ -211,14 +211,14 @@ func _is_player_dead():
func die():
player_state = PlayerState.PLAYER_DEAD
if _is_first_person():
if _is_pawn():
animation_player.stop()
animation_player.play("death")
var tween = create_tween()
tween.tween_interval(4)
tween.tween_callback(func():
died.emit(self)
if _is_first_person():
if _is_pawn():
animation_player.stop()
)
flag_carry_component.drop()