diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2017-12-29 00:32:34 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2017-12-29 00:32:34 +0100 |
| commit | 5373e919a0d9e389fc2076963f610d044c21ccb5 (patch) | |
| tree | dafaf1e2f4857d37bb8ba36cd02c8ccd7d40635e /Penguloon/UserdataManager.cs | |
| parent | a9adf4d4d52a9d42b885e2fc1dee9ea2f4451331 (diff) | |
level implementation XDDDDDDDd
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 |
