summaryrefslogtreecommitdiff
path: root/entities/player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'entities/player.gd')
-rw-r--r--entities/player.gd40
1 files changed, 40 insertions, 0 deletions
diff --git a/entities/player.gd b/entities/player.gd
new file mode 100644
index 0000000..ea5e333
--- /dev/null
+++ b/entities/player.gd
@@ -0,0 +1,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
+ ),
+ ]
+ )