aboutsummaryrefslogtreecommitdiff
path: root/client/player/player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/player/player.gd')
-rw-r--r--client/player/player.gd9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/player/player.gd b/client/player/player.gd
index 4a5cfa6a..4806b19d 100644
--- a/client/player/player.gd
+++ b/client/player/player.gd
@@ -32,12 +32,13 @@ var bubble: ChatBubble = preload("res://player/chat_bubble.tscn").instantiate()
var hand: Item = null
var hand_base: Node3D = Node3D.new()
+var character_idx: int
var _anim_angle: float = 0.0
const HAND_BASE_POSITION: Vector3 = Vector3(0, .25, .4)
-func _init(_id: int, new_name: String, pos: Vector2, _character: int, new_game: Game):
+func _init(_id: int, new_name: String, pos: Vector2, new_character_idx: int, new_game: Game):
add_child(character)
position_ = pos
name = new_name
@@ -47,6 +48,12 @@ func _init(_id: int, new_name: String, pos: Vector2, _character: int, new_game:
add_child(hand_base)
add_child(bubble)
+
+ character_idx = new_character_idx
+
+
+func _ready():
+ character.select_hairstyle(character_idx)
func update_position(new_position: Vector2, new_rotation: float):
position_ = new_position