I’m creating a LevelStats class that I will use to save information about each level, for example, the best time, the number of chests collected, number of stars won etc…
But I am not sure what the best way to build it is, as a static class with static functions, or as a normal class which I create new instances of for each level? The way I am saving values is: ProfileName.LevelName.StatName
If static, then I could save any stat from anywhere with:
LevelStats.SaveLevelBestLap( Application.loadedLevelName, laptime );
if not static, then I would need to create an instance of it in any class that will need to save stats:
public LevelStats levelStats = new LevelStats( Application.loadedLevelName );
levelStats.SaveLevelBestLap( laptime );
I’m looking for a few tips from you guys with experience with this type of stuff. Is using a static class a better fit?
Thanks guys!
Stephane