feat: Implement core player character logic with networked movement, actions, state management, and character selection.
This commit is contained in:
Binary file not shown.
@@ -750,6 +750,9 @@ func _apply_tint_recursive(node: Node, color: Color):
|
|||||||
_apply_tint_recursive(child, color)
|
_apply_tint_recursive(child, color)
|
||||||
|
|
||||||
var immunity_timer: float = 0.0
|
var immunity_timer: float = 0.0
|
||||||
|
var tekton_carry_timer: float = 0.0
|
||||||
|
const MAX_TEKTON_CARRY_TIME: float = 3.0
|
||||||
|
|
||||||
|
|
||||||
@rpc("any_peer", "call_local")
|
@rpc("any_peer", "call_local")
|
||||||
func apply_stagger(duration: float = 1.5):
|
func apply_stagger(duration: float = 1.5):
|
||||||
@@ -1182,6 +1185,16 @@ func _physics_process(delta):
|
|||||||
if can_rpc():
|
if can_rpc():
|
||||||
rpc("remote_set_position", current_world_pos, Time.get_ticks_msec())
|
rpc("remote_set_position", current_world_pos, Time.get_ticks_msec())
|
||||||
|
|
||||||
|
# Tekton Auto-Drop Timer (3s Rule)
|
||||||
|
if is_multiplayer_authority() and is_carrying_tekton:
|
||||||
|
tekton_carry_timer += delta
|
||||||
|
if tekton_carry_timer >= MAX_TEKTON_CARRY_TIME:
|
||||||
|
tekton_carry_timer = 0.0
|
||||||
|
print("[Player %s] 3-second rule: Auto-dropping Tekton" % name)
|
||||||
|
drop_tekton()
|
||||||
|
elif not is_carrying_tekton:
|
||||||
|
tekton_carry_timer = 0.0
|
||||||
|
|
||||||
# NOTE: Finish line checking removed - game uses cycle-based goals system now
|
# NOTE: Finish line checking removed - game uses cycle-based goals system now
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
|||||||
+3
-4
@@ -161,15 +161,14 @@ visible = false
|
|||||||
billboard = 1
|
billboard = 1
|
||||||
sprite_frames = ExtResource("10_y4r1p")
|
sprite_frames = ExtResource("10_y4r1p")
|
||||||
animation = &"stunned-receiver"
|
animation = &"stunned-receiver"
|
||||||
frame_progress = 0.016138485
|
frame = 59
|
||||||
|
frame_progress = 1.0
|
||||||
|
|
||||||
[node name="attack_mode_top" type="AnimatedSprite3D" parent="." unique_id=2002706555]
|
[node name="attack_mode_top" type="AnimatedSprite3D" parent="." unique_id=2002706555]
|
||||||
transform = Transform3D(0.5, 0, 0, 0, -2.1855694e-08, -0.5, 0, 0.5, -2.1855694e-08, 0, 1.5653763, 0)
|
transform = Transform3D(0.5, 0, 0, 0, -2.1855694e-08, -0.5, 0, 0.5, -2.1855694e-08, 0, 1.5653763, 0)
|
||||||
visible = false
|
visible = false
|
||||||
sprite_frames = ExtResource("10_y4r1p")
|
sprite_frames = ExtResource("10_y4r1p")
|
||||||
animation = &"attack-mode-receiver-top"
|
animation = &"freeze-initiator"
|
||||||
frame = 7
|
|
||||||
frame_progress = 1.0
|
|
||||||
|
|
||||||
[node name="attack_mode_bot" type="AnimatedSprite3D" parent="." unique_id=1320274503]
|
[node name="attack_mode_bot" type="AnimatedSprite3D" parent="." unique_id=1320274503]
|
||||||
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, -0.6701627, 0)
|
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, -0.6701627, 0)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
@export var throw_interval_min: float = 2.0
|
@export var throw_interval: float = 2.0
|
||||||
@export var throw_interval_max: float = 4.0
|
|
||||||
@export var throw_range: int = 3
|
@export var throw_range: int = 3
|
||||||
|
|
||||||
var tekton: Node3D
|
var tekton: Node3D
|
||||||
@@ -32,7 +31,7 @@ func _ready():
|
|||||||
_start_timer()
|
_start_timer()
|
||||||
|
|
||||||
func _start_timer():
|
func _start_timer():
|
||||||
timer.wait_time = randf_range(throw_interval_min, throw_interval_max)
|
timer.wait_time = throw_interval
|
||||||
timer.start()
|
timer.start()
|
||||||
|
|
||||||
func _on_timer_timeout():
|
func _on_timer_timeout():
|
||||||
|
|||||||
Reference in New Issue
Block a user