Rework game over logic and game initialization
This commit is contained in:
@@ -14,12 +14,21 @@ public class VTComponent : IVTComponent
|
||||
|
||||
private readonly AutoProp<int> _maximumVT;
|
||||
|
||||
private readonly int _initialValue;
|
||||
|
||||
public bool AtFullVT => CurrentVT.Value == MaximumVT.Value;
|
||||
|
||||
public VTComponent(int initialVT)
|
||||
{
|
||||
_maximumVT = new AutoProp<int>(initialVT);
|
||||
_currentVT = new AutoProp<int>(initialVT);
|
||||
_initialValue = initialVT;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
_maximumVT.OnNext(_initialValue);
|
||||
_currentVT.OnNext(_initialValue);
|
||||
}
|
||||
|
||||
public void Restore(int restoreAmount)
|
||||
|
||||
Reference in New Issue
Block a user