diff --git a/BodyConfig/bodyBuildingScript.gd b/BodyConfig/bodyBuildingScript.gd index 835ad3f..9b0de90 100644 --- a/BodyConfig/bodyBuildingScript.gd +++ b/BodyConfig/bodyBuildingScript.gd @@ -33,6 +33,17 @@ func _ready(): _rayCast = get_node(rayCastPath) as RayCast _viewport = get_node(viewPortPath) as Viewport _playerNum = get_node(playerNumPath) as Label + + # Keybinds of first player + _torso.get_node("DownFrontLeft").key = KEY_D + _torso.get_node("DownFrontRight").key = KEY_F + _torso.get_node("DownBackLeft").key = KEY_A + _torso.get_node("DownBackRight").key = KEY_S + + _torso.get_node("UpFrontLeft").key = KEY_E + _torso.get_node("UpFrontRight").key = KEY_R + _torso.get_node("UpBackLeft").key = KEY_W + _torso.get_node("UpBackRight").key = KEY_Q func change_count_ui(): @@ -40,6 +51,19 @@ func change_count_ui(): print("test") done_player_count = 0 _playerNum.text = str(done_player_count + 1) + "/" + str(InGameState.player_count) + + # TODO: Move somewhere else because it's not UI! + if done_player_count == 1: + # Keybinds of second player + _torso.get_node("DownFrontLeft").key = KEY_H + _torso.get_node("DownFrontRight").key = KEY_J + _torso.get_node("DownBackLeft").key = KEY_K + _torso.get_node("DownBackRight").key = KEY_L + + _torso.get_node("UpFrontLeft").key = KEY_Z + _torso.get_node("UpFrontRight").key = KEY_U + _torso.get_node("UpBackLeft").key = KEY_I + _torso.get_node("UpBackRight").key = KEY_O func _process(delta):