<commit_before>﻿using HUX.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;

public class HoloLensLobbyPlayer : NetworkLobbyPlayer
{
    static Color[] Colors = new Color[] { Color.magenta, Color.red, Color.cyan, Color.blue, Color.green, Color.yellow };
    //used on server to avoid assigning the same color to two player
    static List<int> _colorInUse = new List<int>();

    public TextMesh statusText;
    public TextMesh nameText;

    public ObjectCollection playerCollection;

    //OnMyName function will be invoked on clients when server change the value of playerName
    [SyncVar(hook = "OnMyName")]
    public string playerName = "";
    [SyncVar(hook = "OnMyColor")]
    public Color playerColor = Color.white;

    //public override void OnStartLocalPlayer()
    //{
    //    base.OnStartLocalPlayer();
    //}

    //public override void OnStartAuthority()
    //{
    //    base.OnStartAuthority();
    //    SetupLocalPlayer();
    //}

    public override void OnClientEnterLobby()
    {
        base.OnClientEnterLobby();

        //PlayerList.instance.AddPlayer(this);

        //var lobbyPlayer = this;<commit_msg>correctly initialiase local player<commit_after>﻿using HUX.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Networking;

public class HoloLensLobbyPlayer : NetworkLobbyPlayer
{
    static Color[] Colors = new Color[] { Color.magenta, Color.red, Color.cyan, Color.blue, Color.green, Color.yellow };
    //used on server to avoid assigning the same color to two player
    static List<int> _colorInUse = new List<int>();

    public TextMesh statusText;
    public TextMesh nameText;

    public ObjectCollection playerCollection;

    //OnMyName function will be invoked on clients when server change the value of playerName
    [SyncVar(hook = "OnMyName")]
    public string playerName = "";
    [SyncVar(hook = "OnMyColor")]
    public Color playerColor = Color.white;

    //public override void OnStartLocalPlayer()
    //{
    //    base.OnStartLocalPlayer();
    //}

    public override void OnStartAuthority()
    {
        base.OnStartAuthority();
        SetupLocalPlayer();
    }

    public override void OnClientEnterLobby()
    {
        base.OnClientEnterLobby();

        //PlayerList.instance.AddPlayer(this);

        //var lobbyPlayer = this;
{'fraction_non_alphanumeric': 0.09931918301962354, 'fraction_numerical': 0.0, 'mean_word_length': 3.306896551724138, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1350118', 'n_tokens_mistral': 702, 'n_tokens_neox': 686, 'n_words': 202}