public void AddPlayer(string id) { lock (list) { ScenePlayer p = new ScenePlayer(); p.id = id; list.Add(id, p); } }
public void UpdateInfo(string id, float x, float y, int score) { ScenePlayer p = list[id]; if (p == null) { return; } p.x = x; p.y = y; p.score = score; }