aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/player/player.gd15
1 files changed, 8 insertions, 7 deletions
diff --git a/client/player/player.gd b/client/player/player.gd
index dba63cbf..5650c52e 100644
--- a/client/player/player.gd
+++ b/client/player/player.gd
@@ -55,15 +55,18 @@ const DEFAULT_HAND_BASE_POSITION_CENTER: Vector3 = Vector3(0, .425, .4)
const DEFAULT_HAND_BASE_POSITION_LEFT: Vector3 = Vector3(.3, .425, .4)
const DEFAULT_HAND_BASE_POSITION_RIGHT: Vector3 = Vector3(-.3, .425, .4)
-func _init(_id: int, name_: String, pos: Vector2, character_style: Dictionary, player_class: String, game: Game):
+func _init(_id: int, name_: String, pos: Vector2, character_style_: Dictionary, player_class_: String, game_: Game):
+ character_style = character_style_
+ player_class = player_class_
+ game = game_
+ if name_ != "":
+ name = name_
+ username = name_
+
add_child(movement_base)
movement_base.add_child(character)
position_ = pos
position_anim = pos
- if name_ != "":
- name = name_
- self.game = game
- username = name_
if game.hand_count == 1:
var center = Node3D.new()
@@ -91,8 +94,6 @@ func _init(_id: int, name_: String, pos: Vector2, character_style: Dictionary, p
marker.visible = false
add_child(marker)
- self.character_style = character_style
- self.player_class = player_class
is_customer = player_class == "customer"
is_chef = player_class == "chef"