diff options
Diffstat (limited to 'Penguloon/UserdataManager.cs')
| -rw-r--r-- | Penguloon/UserdataManager.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Penguloon/UserdataManager.cs b/Penguloon/UserdataManager.cs index 872ab1d..eca3580 100644 --- a/Penguloon/UserdataManager.cs +++ b/Penguloon/UserdataManager.cs @@ -15,6 +15,8 @@ namespace Penguloon public static int HighestRound { get; set; } public static int HighestKills { get; set; } + public static int Level { get; set; } + public static void WriteData(Context context) { File file = new File(context.CacheDir, "userdata.txt"); @@ -46,5 +48,19 @@ namespace Penguloon HighestKills = int.Parse(lines[4]); } } + + public static int GetLevel() + { + for (int i = 0; i < 999; i++) + { + int killsNeeded = (int)((i * 50) * (i * 1.1)); + + if (TotalKills > killsNeeded) continue; + + return i; + } + + return 0; + } } }
\ No newline at end of file |
