extends Node3D

const CLASS_COLORS: Dictionary = {
	"Krieger":  Color(0.80, 0.20, 0.20),  # Rot
	"Magier":   Color(0.20, 0.20, 0.90),  # Blau
	"Kleriker": Color(0.90, 0.85, 0.20),  # Gelb
	"Schurke":  Color(0.20, 0.65, 0.20),  # Grün
	"Druide":   Color(0.40, 0.75, 0.30),  # Hellgrün
	"Barbar":   Color(0.75, 0.40, 0.10),  # Orange
}
const DEFAULT_COLOR := Color(0.65, 0.65, 0.65)  # Grau

func set_color(archetype: String) -> void:
	var mat := StandardMaterial3D.new()
	mat.albedo_color = CLASS_COLORS.get(archetype, DEFAULT_COLOR)
	($Capsule as MeshInstance3D).material_override = mat

func set_label(player_name: String) -> void:
	($NameLabel as Label3D).text = player_name
