Sort playerlist

Options
Anyway to sort playerlist. I wana sort players with their kills key. Anyway to achieve this

Comments

  • Tibers
    Options
    
            using System.Linq;
    	List<PhotonPlayer> playerList = PhotonNetwork.playerList.ToList();
    	playerList.Sort(SortByKills);
    
    
    	public static int SortByKills (PhotonPlayer a, PhotonPlayer b){
    		return b.GetKills().CompareTo(a.GetKills());
    	}