private int GetScoresByKills int kills if kills return else if kills k

 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
private int GetScoresByKills(int kills)
{
if (kills == 0)
{
return 0;
}
else if (kills >= 1 && kills <= 2)
{
return 1;
}
else if (kills >= 3 && kills <= 4)
{
return 2;
}
else if (kills >= 5 && kills <= 7)
{
return 3;
}
else
{
return 5;
}
}
private int GetScoresByRank(int rank)
{
if (rank == 1)
{
return 5;
}
else if (rank == 2)
{
return 4;
}
else if (rank == 3)
{
return 3;
}
else if (rank >= 4 && rank <= 6)
{
return 2;
}
else if (rank >= 7 && rank <= 10)
{
return 1;
}
else
{
return 0;
}
}
int killsScore = GetScoresByKills(playerKills);
int rank = scoreHandler.GetCharacterPositionInLeaderBoard(player) + 1;
int rankScore = GetScoresByRank(rank);
int goldByKills = killsScore * 2;
int goldByRank = rankScore * 2;
int expByKills = killsScore * 10;
int expByRank = rankScore * 10;