2024-02-28 21:44:24 +01:00

29 lines
542 B
GDScript

class_name Player
extends Character
## Player ID
var id: String
## Components
var movement: MovementComponent
var state: StateComponent
var performance: PerformanceComponent
var animation: AnimationComponent
var physics: CharacterBody3D
var chat: ChatComponent
func _enter_tree():
movement = $Movement
state = $State
performance = $Performance
animation = $Animation
physics = $Physics
chat = $Chat
## Name
signal name_changed(new_name: String)
func set_player_name(new_name: String):
name = new_name
name_changed.emit(new_name)