2024-02-13 00:22:27 +01:00

28 lines
447 B
GDScript

class_name Player
extends CharacterBody3D
signal attacked
signal dashed
signal jumped
signal name_changed(new_name: String)
signal direction_changed
var id: String
var controller: Controller
func attack():
attacked.emit()
func dash():
dashed.emit()
func jump():
jumped.emit()
func set_direction(direction: Vector3):
direction_changed.emit(direction)
func set_player_name(new_name: String):
name = new_name
name_changed.emit(new_name)