summaryrefslogtreecommitdiff
path: root/entities/player.gd
blob: ea5e333aa137e1e80e0fbdfa01634c3da0ddd3b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class_name Player
extends CharacterBody3D


@export var data: PlayerData


func _ready() -> void:
	%Head.texture = load(
		"%s/%s/000.png" % [
			"res://client_data/data/sprite",
			Constants.FilePaths.get_player_head(
				Client.character.info.gender,
				Client.character.info.head
			),
		]
	)
	%Head.visible = true
	
	%Body.texture = load(
		"%s/%s/000.png" % [
			"res://client_data/data/sprite",
			Constants.FilePaths.get_player_body(
				Client.character.info.gender,
				Client.character.info.job
			),
		]
	)


func set_head(direction: Constants.Direction):
	%Head.texture = load(
		"%s/%s/000.png" % [
			"res://client_data/data/sprite",
			Constants.FilePaths.get_player_head(
				Client.character.info.gender,
				Client.character.info.head
			),
		]
	)