Rework game over logic and game initialization

This commit is contained in:
2025-10-27 15:04:01 -07:00
parent 720696aed0
commit 7e6dca1c29
46 changed files with 653 additions and 610 deletions

View File

@@ -27,10 +27,19 @@ public class ExperiencePointsComponent : IExperiencePointsComponent
var firstLevelExpRequirement = ExpToNextLevelCalculation(1);
_expToNextLevel = new AutoProp<int>(firstLevelExpRequirement);
_currentExp = new AutoProp<int>(0);
_expGainRate = new AutoProp<double>(1.0);
_expGainRate = new AutoProp<double>(1);
_level = new AutoProp<int>(1);
}
public void Reset()
{
_currentExp.OnNext(0);
_expGainRate.OnNext(1);
_level.OnNext(1);
var firstLevelExpRequirement = ExpToNextLevelCalculation(1);
_expToNextLevel.OnNext(firstLevelExpRequirement);
}
public void Gain(int baseExpGain)
{
var modifiedExpGain = baseExpGain * _expGainRate.Value;