diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2025-01-05 16:54:36 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2025-01-05 16:54:36 +0100 |
commit | 35b0f811f23f029110373798b19d9d0895d907f0 (patch) | |
tree | 2e4906a992c2569fa0f89dbe0f079010a734cc41 /entities/player.gd | |
parent | e08a29e73ea4f7e6d78e8e7f5a6e7033dbc1f542 (diff) |
next commit
Diffstat (limited to 'entities/player.gd')
-rw-r--r-- | entities/player.gd | 40 |
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 + ), + ] + ) |