mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Actually disable PlayerWatcher if it is unused, and stop iterations on Clear().
This commit is contained in:
parent
9666909e87
commit
557d03861f
2 changed files with 48 additions and 13 deletions
|
|
@ -25,13 +25,16 @@ namespace Penumbra.PlayerWatch
|
|||
}
|
||||
|
||||
public void Enable()
|
||||
=> Active = Valid;
|
||||
=> SetStatus( true );
|
||||
|
||||
public void Disable()
|
||||
=> Active = false;
|
||||
=> SetStatus( false );
|
||||
|
||||
public void SetStatus( bool enabled )
|
||||
=> Active = enabled && Valid;
|
||||
{
|
||||
Active = enabled && Valid;
|
||||
_playerWatch?.CheckActiveStatus();
|
||||
}
|
||||
|
||||
internal void Trigger( Actor actor )
|
||||
=> ActorChanged?.Invoke( actor );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue