void PlayerSpawned(object sender, IdEventArgs e) { Player player = game.Players[e.Id]; AddPlayerInfo(player); columns = Utils.CeilDiv(namesCount, namesPerColumn); SortPlayerInfo(); }
void PlayerDespawned(object sender, IdEventArgs e) { for (int i = 0; i < namesCount; i++) { PlayerInfo pInfo = info[i]; if (pInfo.PlayerId == e.Id) { RemoveInfoAt(info, i); return; } } }
void PlayerListInfoRemoved(object sender, IdEventArgs e) { for (int i = 0; i < namesCount; i++) { PlayerInfo pInfo = info[i]; if (!pInfo.IsGroup && pInfo.NameId == e.Id) { RemoveInfoAt(info, i); return; } } }
void PlayerListInfoChanged(object sender, IdEventArgs e) { for (int i = 0; i < namesCount; i++) { PlayerInfo pInfo = info[i]; if (!pInfo.IsGroup && pInfo.NameId == e.Id) { Texture tex = textures[i]; graphicsApi.DeleteTexture(ref tex); AddPlayerInfo(game.CpePlayersList[e.Id], i); SortPlayerInfo(); return; } } }
void PlayerListInfoChanged(object sender, IdEventArgs e) { for (int i = 0; i < namesCount; i++) { PlayerInfo pInfo = info[i]; if (pInfo.Id != e.Id) { continue; } Texture tex = textures[i]; graphicsApi.DeleteTexture(ref tex); AddPlayerInfo(new PlayerInfo(game.CpePlayersList[e.Id]), i); SortPlayerInfo(); return; } }
void PlayerDespawned(object sender, IdEventArgs e) { for (int i = 0; i < namesCount; i++) { PlayerInfo pInfo = info[i]; if (pInfo.PlayerId == e.Id) { Texture tex = textures[i]; graphicsApi.DeleteTexture(ref tex); RemoveItemAt(info, i); RemoveItemAt(textures, i); namesCount--; columns = Utils.CeilDiv(namesCount, namesPerColumn); SortPlayerInfo(); return; } } }
void PlayerListInfoAdded(object sender, IdEventArgs e) { AddPlayerInfo(new PlayerInfo(game.CpePlayersList[e.Id]), -1); columns = Utils.CeilDiv(namesCount, namesPerColumn); SortPlayerInfo(); }
void PlayerSpawned(object sender, IdEventArgs e) { AddPlayerInfo(new PlayerInfo(game.Players[e.Id]), -1); columns = Utils.CeilDiv(namesCount, namesPerColumn); SortPlayerInfo(); }