예제 #1
0
 internal AllPlayersNode(string JSON)
     : base(JSON)
 {
     foreach (JToken jt in _Data.Children())
     {
         PlayerNode pn = new PlayerNode(jt.First.ToString());
         pn._SteamID = jt.Value <JProperty>()?.Name ?? "";
         _Players.Add(pn);
     }
 }
예제 #2
0
 internal AllPlayersNode(string JSON)
     : base(JSON)
 {
     foreach (JToken jt in _Data.Children())
     {
         PlayerNode pn = new PlayerNode(jt.First.ToString());
         pn._SteamID = jt.Value<JProperty>()?.Name ?? "";
         _Players.Add(pn);
     }
 }
예제 #3
0
        public PlayerNode GetBySteamID(string SteamID)
        {
            PlayerNode pn = _Players.Find(x => x.SteamID == SteamID);

            if (pn != null)
            {
                return(pn);
            }

            return(new PlayerNode(""));
        }
예제 #4
0
        public PlayerNode GetByName(string Name)
        {
            PlayerNode pn = _Players.Find(x => x.Name == Name);

            if (pn != null)
            {
                return(pn);
            }

            return(new PlayerNode(""));
        }