Improvement

This commit is contained in:
Syntriax 2022-12-02 00:09:14 +03:00
parent eb0d7fc7a7
commit 63020a0b9e
1 changed files with 3 additions and 4 deletions

View File

@ -13,11 +13,10 @@ namespace Syntriax.Modules.Trigger
get => _isTrigerred; get => _isTrigerred;
protected set protected set
{ {
bool oldValue = _isTrigerred; if (value == _isTrigerred)
return;
_isTrigerred = value; _isTrigerred = value;
if (oldValue != value)
OnTriggered?.Invoke(value); OnTriggered?.Invoke(value);
} }
} }