feat: Implement core player character logic with networked movement, actions, state management, and character selection.

This commit is contained in:
Yogi Wiguna
2026-03-23 17:33:08 +08:00
parent bad2364fff
commit 9867ddc262
4 changed files with 18 additions and 7 deletions
Binary file not shown.
+13
View File
@@ -750,6 +750,9 @@ func _apply_tint_recursive(node: Node, color: Color):
_apply_tint_recursive(child, color)
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")
func apply_stagger(duration: float = 1.5):
@@ -1182,6 +1185,16 @@ func _physics_process(delta):
if can_rpc():
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
# --------------------------------------------------------------------
+3 -4
View File
@@ -161,15 +161,14 @@ visible = false
billboard = 1
sprite_frames = ExtResource("10_y4r1p")
animation = &"stunned-receiver"
frame_progress = 0.016138485
frame = 59
frame_progress = 1.0
[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)
visible = false
sprite_frames = ExtResource("10_y4r1p")
animation = &"attack-mode-receiver-top"
frame = 7
frame_progress = 1.0
animation = &"freeze-initiator"
[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)
+2 -3
View File
@@ -1,7 +1,6 @@
extends Node
@export var throw_interval_min: float = 2.0
@export var throw_interval_max: float = 4.0
@export var throw_interval: float = 2.0
@export var throw_range: int = 3
var tekton: Node3D
@@ -32,7 +31,7 @@ func _ready():
_start_timer()
func _start_timer():
timer.wait_time = randf_range(throw_interval_min, throw_interval_max)
timer.wait_time = throw_interval
timer.start()
func _on_timer_timeout():