Beispiel #1
0
    public void Save()
    {
        exp  += stack;
        stack = 0;
        ExperienceIO.SaveExp(exp);

        ExpChanged?.Invoke(exp);
    }
Beispiel #2
0
    public void GainExp()
    {
        exp += level;
        ExpChanged?.Invoke(exp);

        if (exp < expToLevel)
        {
            return;
        }

        exp %= expToLevel;
        level++;
        expToLevel *= level;
        LevelChanged?.Invoke(level);
        ExpChanged?.Invoke(exp);
    }
Beispiel #3
0
 public void Load()
 {
     exp = ExperienceIO.LoadExp();
     ExpChanged?.Invoke(exp);
 }