open-strike-2/scenes/characters/blue/dummy.gd
Nikolai Rodionov dfe888a918
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Move the real player authority to server
- Add rust bindings for the server player controller
- Implement reconciliation loop for checking the player state
- Place spawners on the test map
- Add Containerfile and helm chart
2025-01-31 19:24:57 +00:00

40 lines
1.3 KiB
GDScript

extends Node3D
var owner_placeholder: CharacterBody3D = null
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$Body/Armature/Skeleton3D.physical_bones_start_simulation()
owner_placeholder = _get_owner()
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_head_collision_body_part_hit(dam: Variant) -> void:
#if owner_placeholder.has_method("take_damage"):
if owner_placeholder:
owner_placeholder.take_damage(dam)
pass # Replace with function body.
func _get_owner() -> CharacterBody3D:
var owner_placeholder := find_parent("PlayerPlaceholder*")
return owner_placeholder
func die():
for child in $Body/Armature/Skeleton3D/PhysicalBoneSimulator3D.get_children():
if child is PhysicalBone3D:
child.collision_layer = 1
child.collision_mask = 1
$Body/Armature/Skeleton3D.physical_bones_stop_simulation()
$Body/Armature/Skeleton3D/PhysicalBoneSimulator3D.physical_bones_start_simulation()
func make_invisible():
$Body/Armature/Skeleton3D/Alpha_Joints.set_layer_mask_value(1, false)
$Body/Armature/Skeleton3D/Alpha_Surface.set_layer_mask_value(1, false)
$Body/Armature/Skeleton3D/Alpha_Joints.set_layer_mask_value(2, true)
$Body/Armature/Skeleton3D/Alpha_Surface.set_layer_mask_value(2, true)