public ProcessListener(PlayerSessionManager mgr, System.Diagnostics.Process process)
 {
     m_bDone               = false;
     m_Manager             = mgr;
     m_Process             = process;
     m_Thread              = new System.Threading.Thread(Run);
     m_Thread.Name         = "DJAPI ProcessListener";
     m_Thread.IsBackground = true;
 }
		public ProcessListener(PlayerSessionManager mgr, System.Diagnostics.Process process)
		{
			m_bDone = false;
			m_Manager = mgr;
			m_Process = process;
			m_Thread = new System.Threading.Thread(Run);
			m_Thread.Name = "DJAPI ProcessListener";
			m_Thread.IsBackground = true;
		}
Esempio n. 3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
         return;
     }
     sessionTokens          = new Dictionary <string, ushort>();
     charData               = new Dictionary <string, ConnectedPlayer>();
     loggedInCharacters     = new Dictionary <IClient, string>();
     loggedInCharactersByID = new Dictionary <string, IClient>();
 }
Esempio n. 4
0
    public void UpdateList()
    {
        SessionManager = FindObjectOfType <PlayerSessionManager>();

        var p = Instantiate(SessionManager.CurrentPlayer.PreferenceType.ItemsList);

        if (ListHolder.transform.childCount > 0)
        {
            Destroy(ListHolder.transform.GetChild(0).gameObject);
        }

        p.transform.parent        = ListHolder.transform;
        p.transform.localPosition = Vector3.zero;
        p.transform.localScale    = new Vector3(300, 300, 300);
        p.transform.localRotation = Quaternion.identity;
    }
        /// <summary> Dump the content of internal variables</summary>
        public static void  doShowProperties(DebugCLI cli)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            Session session = cli.Session;

            foreach (String key in cli.propertyKeys())
            {
                int value = cli.propertyGet(key);
                sb.Append(key);
                sb.Append(" = ");                 //$NON-NLS-1$
                sb.Append(value);
                sb.Append('\n');
            }

            // session manager
            {
                PlayerSessionManager mgr = (PlayerSessionManager)Bootstrap.sessionManager();
                sb.Append(LocalizationManager.getLocalizedTextString("key21"));                 //$NON-NLS-1$
                sb.Append('\n');
                foreach (String key in mgr.keySet())
                {
                    Object value = mgr.getPreferenceAsObject(key);
                    sb.Append(key);
                    sb.Append(" = ");                     //$NON-NLS-1$
                    sb.Append(value);
                    sb.Append('\n');
                }
            }

            if (session != null)
            {
                PlayerSession psession = (PlayerSession)session;
                sb.Append(LocalizationManager.getLocalizedTextString("key22"));                 //$NON-NLS-1$
                sb.Append('\n');
                foreach (String key in psession.keySet())
                {
                    Object value = psession.getPreferenceAsObject(key);
                    sb.Append(key);
                    sb.Append(" = ");                     //$NON-NLS-1$
                    sb.Append(value);
                    sb.Append('\n');
                }
            }

            cli.output(sb.ToString());
        }
Esempio n. 6
0
    void Start()
    {
        SessionManager = FindObjectOfType <PlayerSessionManager>();

        List <SessionPlayer> PlayerSorted = SessionManager.Players.OrderBy(o => o.GetPoints()).ToList();

        PlayerName.text = "";

        Debug.Log("PlayerSorted: " + PlayerSorted.Count);

        for (int i = PlayerSorted.Count - 1; i >= 0; i--)
        {
            Debug.Log(PlayerSorted[i].GetPoints());

            if (i == PlayerSorted.Count - 1)
            {
                PlayerName.text += "<color=" + '"'.ToString() + "#339933" + '"'.ToString() + ">" + PlayerSorted[i].PlayerID + ": " + PlayerSorted[i].GetPoints() + "</color>\n";
            }
            else
            {
                PlayerName.text += PlayerSorted[i].PlayerID + ": " + PlayerSorted[i].GetPoints() + "\n";
            }
        }
    }
Esempio n. 7
0
 void Start()
 {
     SessionManager = FindObjectOfType <PlayerSessionManager>();
 }
Esempio n. 8
0
 void Start()
 {
     SessionManager = FindObjectOfType <PlayerSessionManager>();
     UpdateFoodPreferenceDropdown();
 }