feat: Implement player movement manager with grid-based movement, rotation, and advanced 'SUPER PUSH' mechanics.

This commit is contained in:
Yogi Wiguna
2026-02-06 13:59:18 +08:00
parent 10aa309148
commit 263af68596
3 changed files with 12 additions and 8 deletions
+4 -5
View File
@@ -1905,10 +1905,10 @@ transform = Transform2D(1.11, 0, 0.105, 1.025, 15, 50)
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 217.0
offset_top = -20.0
offset_right = 257.0
offset_bottom = 3.0
offset_left = 261.0
offset_top = -113.0
offset_right = 301.0
offset_bottom = -68.0
grow_vertical = 2
theme_override_font_sizes/font_size = 32
text = "X0"
@@ -10544,7 +10544,6 @@ text = "3:00"
horizontal_alignment = 1
[node name="TouchControls" type="CanvasLayer" parent="." unique_id=1390485948]
visible = false
script = ExtResource("touch_manager")
[node name="TouchControls" type="Control" parent="TouchControls" unique_id=1539594058]
+6 -1
View File
@@ -151,7 +151,12 @@ func try_push(target_pos: Vector2i, direction: Vector2i) -> bool:
if main:
var gcm = main.get_node_or_null("GoalsCycleManager")
if gcm:
gcm.rpc("request_add_score", 200)
if multiplayer.is_server():
# Server/Bot: Directly add score to specific player ID
gcm.add_score(player.name.to_int(), 200)
else:
# Client: Request score add (sender ID used)
gcm.rpc("request_add_score", 200)
NotificationManager.send_message(player, "Successful Attack! +200 Pts", NotificationManager.MessageType.GOAL)
# 5. Attack Mode Persistence
+2 -2
View File
@@ -7,8 +7,8 @@ var player: Node3D
var enhanced_gridmap: Node
# Goals and Playerboard (core functionality retained)
var goals: Array[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0]
var playerboard: Array[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
var goals: Array[int] = [-1, -1, -1, -1, -1, -1, -1, -1, -1]
var playerboard: Array[int] = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]
# DEPRECATED: Lap system removed - keeping stubs for compatibility
var can_finish: bool = false # No longer used