Various cleanup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Chickensoft.Collections;
|
||||
using Godot;
|
||||
using System;
|
||||
using Zennysoft.Ma.Adapter;
|
||||
|
||||
@@ -49,7 +50,14 @@ public class AttackComponent : IAttackComponent
|
||||
|
||||
public void RaiseMaximumAttack(int raiseAmount)
|
||||
{
|
||||
_maximumAttack.OnNext(raiseAmount);
|
||||
_maximumAttack.OnNext(_maximumAttack.Value + raiseAmount);
|
||||
Restore(raiseAmount);
|
||||
}
|
||||
|
||||
public void LowerMaximumAttack(int lowerAmount)
|
||||
{
|
||||
_maximumAttack.OnNext(Mathf.Max(_maximumAttack.Value + lowerAmount, 0));
|
||||
if (_currentAttack.Value > _maximumAttack.Value)
|
||||
_currentAttack.OnNext(_maximumAttack.Value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user