-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBonnieData.cs
More file actions
35 lines (29 loc) · 739 Bytes
/
BonnieData.cs
File metadata and controls
35 lines (29 loc) · 739 Bytes
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
using System;
using Il2CppAssets.Scripts.Simulation.Towers.Behaviors;
namespace BonnieHeroMod;
public struct BonnieData()
{
public static int GetMaxTier(int tier)
{
return tier switch
{
< 5 => 10,
< 8 => 15,
< 11 => 20,
< 14 => 25,
< 17 => 30,
< 20 => 35,
>= 20 => 40
};
}
public float CurrentTier { get; set; } = 0;
public float SellAmount { get; set; } = 0;
public static BonnieData Parse(string json)
{
return System.Text.Json.JsonSerializer.Deserialize<BonnieData>(json);
}
public string ToJson()
{
return System.Text.Json.JsonSerializer.Serialize(this);
}
}