extends Node

@onready var player: CharacterBody3D = get_parent()

func _ready() -> void:
  EventBus.role_change_requested.emit(player, PlayerData.current_role)

func _unhandled_input(event: InputEvent) -> void:
  if event.is_action_pressed("class_tank"):
    EventBus.role_change_requested.emit(player, PlayerData.Role.TANK)
  elif event.is_action_pressed("class_damage"):
    EventBus.role_change_requested.emit(player, PlayerData.Role.DAMAGE)
  elif event.is_action_pressed("class_healer"):
    EventBus.role_change_requested.emit(player, PlayerData.Role.HEALER)
