예제 #1
0
    private void OnPlayerDetached(EntityUid uid, AlertsComponent component, PlayerDetachedEvent args)
    {
        if (_playerManager.LocalPlayer?.ControlledEntity != uid)
        {
            return;
        }

        ClearAlerts?.Invoke(this, EventArgs.Empty);
    }
예제 #2
0
    protected override void HandleComponentShutdown(EntityUid uid, AlertsComponent component, ComponentShutdown args)
    {
        base.HandleComponentShutdown(uid, component, args);

        if (_playerManager.LocalPlayer?.ControlledEntity != uid)
        {
            return;
        }

        ClearAlerts?.Invoke(this, EventArgs.Empty);
    }
 private void PlayerDetached()
 {
     ClearAlerts?.Invoke(this, EventArgs.Empty);
 }