Author Topic: Tnet 3.0 sort list of TNManager.players  (Read 4385 times)

Elmo loves cookies

  • Jr. Member
  • **
  • Thank You
  • -Given: 60
  • -Receive: 1
  • Posts: 62
    • View Profile
Tnet 3.0 sort list of TNManager.players
« on: May 26, 2016, 01:24:46 PM »
How (cheaply for mobile) sort leader in the list of Players by specific argument(kills and death)?
Where to store data on the player - in the TNManager.playerData or in some private variable?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Tnet 3.0 sort list of TNManager.players
« Reply #1 on: May 27, 2016, 09:42:54 PM »
TNManager.SetPlayerData would be my suggestion, yes. You can then just get a list of players and sort it by the value. Unless you're sorting every frame, there isn't much point to optimize this either. And if you are sorting every frame... then I'd question your code.