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

@@ -14,10 +14,19 @@ public class DefenseComponent : IDefenseComponent
private readonly AutoProp<int> _maximumDefense;
private readonly int _initialValue;
public DefenseComponent(int defenseValue)
{
_maximumDefense = new AutoProp<int>(defenseValue);
_currentDefense = new AutoProp<int>(defenseValue);
_initialValue = defenseValue;
}
public void Reset()
{
_maximumDefense.OnNext(_initialValue);
_currentDefense.OnNext(_initialValue);
}
public void Restore(int restoreAmount)