feat: implement player logic and add arena assets for free mode

This commit is contained in:
Yogi Wiguna
2026-03-31 15:31:34 +08:00
parent cc207bca3d
commit 3454710f2c
17 changed files with 10263 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
[gd_scene format=3 uid="uid://nwpaqt6drdkr"]
[ext_resource type="PackedScene" uid="uid://b1l0x4yf3lbx8" path="res://assets/models/arena/free_mode/Terrainv2.gltf" id="1_37t6b"]
[node name="Freemode" type="Node3D" unique_id=355029811]
transform = Transform3D(100, 0, 0, 0, 100, 0, 0, 0, 100, 10.565, -0.57, 8.139)
[node name="Terrainv2" parent="." unique_id=1519605696 instance=ExtResource("1_37t6b")]
+12
View File
@@ -256,8 +256,12 @@ func _ready():
if name == str(multiplayer.get_unique_id()):
mat.set_shader_parameter("pointer_color", Color(0.0, 1.0, 0.0, 1.0)) # Green
if has_node("Name"):
$Name.modulate = Color(0.2, 0.8, 0.2, 1.0) # Pleasant Green for Name
else:
mat.set_shader_parameter("pointer_color", Color(1.0, 0.0, 0.0, 1.0)) # Red
if has_node("Name"):
$Name.modulate = Color.WHITE # White for others
if pointer is MeshInstance3D:
pointer.material_override = mat
@@ -1117,6 +1121,10 @@ func attempt_target_action(target_index: int):
inventory_ui.deselect()
func activate_powerup(effect_id: int):
if is_carrying_tekton or is_knock_mode or is_attack_mode:
NotificationManager.send_message(self, "Cannot use Power-Up right now!", NotificationManager.MessageType.WARNING)
return
var main = get_tree().get_root().get_node_or_null("Main")
if not main or not main.ui_manager:
return
@@ -1146,6 +1154,10 @@ func activate_powerup(effect_id: int):
func activate_held_powerup():
"""Finds whichever powerup is currently held and activates it."""
if is_carrying_tekton or is_knock_mode or is_attack_mode:
NotificationManager.send_message(self, "Cannot use Power-Up right now!", NotificationManager.MessageType.WARNING)
return
var active_effect = -1
if special_tiles_manager:
for effect_key in special_tiles_manager.inventory: