2024-02-27 23:21:44 +01:00

27 lines
504 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
func _enter_tree():
movement = $Movement
state = $State
performance = $Performance
animation = $Animation
physics = $Physics
## Name
signal name_changed(new_name: String)
func set_player_name(new_name: String):
name = new_name
name_changed.emit(new_name)