This commit is contained in:
Adam Ramberg 2020-03-16 00:18:26 +01:00
parent 9a8f7495fa
commit c71fe4fa60
2 changed files with 3 additions and 1 deletions

View File

@ -27,6 +27,8 @@ public class DecreaseHealth : MonoBehaviour
public void Do(Collider2D collider)
{
if (collider == null) return;
if (collider.gameObject.HasAnyTag(_tags))
{
collider.GetComponent<UnitHealth>().Health -= _decreaseBy;

View File

@ -13,7 +13,7 @@ namespace UnityAtoms
{
for (var i = 0; i < _variables.Count; ++i)
{
_variables[i].Reset();
_variables[i].Reset(true);
}
}
}