feat: implement player logic and add arena assets for free mode
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user