Rework game over logic and game initialization
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user