forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLeaderboard.cs
More file actions
135 lines (135 loc) · 2.26 KB
/
Copy pathLeaderboard.cs
File metadata and controls
135 lines (135 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
using System;
namespace UnityEngine.SocialPlatforms.Impl
{
public class Leaderboard : ILeaderboard
{
private bool m_Loading;
private IScore m_LocalUserScore;
private uint m_MaxRange;
private IScore[] m_Scores;
private string m_Title;
private string[] m_UserIDs;
public bool loading
{
get
{
return ActivePlatform.Instance.GetLoading(this);
}
}
public string id
{
get;
set;
}
public UserScope userScope
{
get;
set;
}
public Range range
{
get;
set;
}
public TimeScope timeScope
{
get;
set;
}
public IScore localUserScore
{
get
{
return this.m_LocalUserScore;
}
}
public uint maxRange
{
get
{
return this.m_MaxRange;
}
}
public IScore[] scores
{
get
{
return this.m_Scores;
}
}
public string title
{
get
{
return this.m_Title;
}
}
public Leaderboard()
{
this.id = "Invalid";
this.range = new Range(1, 10);
this.userScope = UserScope.Global;
this.timeScope = TimeScope.AllTime;
this.m_Loading = false;
this.m_LocalUserScore = new Score("Invalid", 0L);
this.m_MaxRange = 0u;
this.m_Scores = new Score[0];
this.m_Title = "Invalid";
this.m_UserIDs = new string[0];
}
public void SetUserFilter(string[] userIDs)
{
this.m_UserIDs = userIDs;
}
public override string ToString()
{
return string.Concat(new object[]
{
"ID: '",
this.id,
"' Title: '",
this.m_Title,
"' Loading: '",
this.m_Loading,
"' Range: [",
this.range.from,
",",
this.range.count,
"] MaxRange: '",
this.m_MaxRange,
"' Scores: '",
this.m_Scores.Length,
"' UserScope: '",
this.userScope,
"' TimeScope: '",
this.timeScope,
"' UserFilter: '",
this.m_UserIDs.Length
});
}
public void LoadScores(Action<bool> callback)
{
ActivePlatform.Instance.LoadScores(this, callback);
}
public void SetLocalUserScore(IScore score)
{
this.m_LocalUserScore = score;
}
public void SetMaxRange(uint maxRange)
{
this.m_MaxRange = maxRange;
}
public void SetScores(IScore[] scores)
{
this.m_Scores = scores;
}
public void SetTitle(string title)
{
this.m_Title = title;
}
public string[] GetUserFilter()
{
return this.m_UserIDs;
}
}
}