private void InitializeScoreList() { foreach (PlayerEntity playerEntity in PlayersEntities) { //ACTIVE PLAYERS ONLY ScoreDataEntry newEntry = new ScoreDataEntry(playerEntity.Name.Value, playerEntity.playerScore.Value, playerEntity.GetComponent <BonusHandlerComponent>().PlayerID); _scoreData.ScoreList.Add(newEntry); } _scoreData.PlayerNumberInLastGame = PlayersEntities.Count; _scoreData.Display(); }
private void InitializeScoreList() { for (int i = 0; i < PlayersEntities.Count; i++) //ACTIVE PLAYERS ONLY { if (ScoreReference[i].Value > 0) { ScoreDataEntry newEntry = new ScoreDataEntry(); newEntry.PlayerName = PlayersEntities[i].Name.Value; newEntry.Score = PlayersEntities[i].playerScore.Value; newEntry.PlayerID = PlayersEntities[i].GetComponent <BonusHandlerComponent>().PlayerID; _scoreData.ScoreList.Add(newEntry); } } _scoreData.PlayerNumberInLastGame = PlayersEntities.Count; _scoreData.Display(); }