Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
igem-quantifly
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
igem-quantifly
Commits
74e938b5
Unverified
Commit
74e938b5
authored
Oct 29, 2016
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Score: Display rank too
parent
c4f151fb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
HighScores.cs
Assets/Scripts/HighScores.cs
+5
-1
No files found.
Assets/Scripts/HighScores.cs
View file @
74e938b5
...
...
@@ -32,12 +32,16 @@ public class HighScores : MonoBehaviour {
if
(
Server
.
Scores
.
scores
.
Length
>
0
)
{
for
(
int
i
=
0
;
i
<
highScores
.
Length
;
i
++)
{
int
position
=
i
+
1
;
string
positionText
=
position
+
(
position
==
1
?
"st"
:
position
==
2
?
"nd"
:
position
==
3
?
"rd"
:
"th"
);
Score
score
=
highScores
[
i
];
string
name
=
score
.
playerName
;
if
(
score
.
team
!=
null
&&
score
.
team
.
Length
>
0
)
{
name
+=
" ("
+
score
.
team
+
")"
;
}
ScoreText
.
text
+=
WWW
.
UnEscapeURL
(
name
)
+
": "
+
score
.
score
+
" points\n"
;
ScoreText
.
text
+=
positionText
+
" "
+
WWW
.
UnEscapeURL
(
name
)
+
": "
+
score
.
score
+
" points\n"
;
}
}
else
{
ScoreText
.
text
=
"No high-score yet... Play a game and show you are the best!"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment