Compares THIS instance with another PlayerState and returns an integer that indicates whether THIS instance precedes, follows, or occurs in the same position in the final scoring order as the other player. This is used for determining the order of players in the leaderboard. Meaning that if A<B then A is in a better position than B.
The player with the highest score wins.
public int CompareTo(
PlayerState? other
)
Value | Meaning |
---|---|
Less than zero | This instance precedes other in the sort order. |
Zero | This instance occurs in the same position in the sort order as other. |
Greater than zero | This instance follows other in the sort order. |