コード例 #1
0
 public void ClearOverlay()
 {
     if (_overlayManager.HasOverlay <ExplosionDebugOverlay>())
     {
         _overlayManager.RemoveOverlay <ExplosionDebugOverlay>();
     }
     _debugOverlay = null;
 }
        private void RemoveOverlay()
        {
            if (CurrentlyControlled && _currentEffect != ScreenEffects.None)
            {
                var appliedEffect = _effectsDictionary[_currentEffect];
                _overlayManager.RemoveOverlay(appliedEffect.ID);
            }

            _currentEffect = ScreenEffects.None;
        }
コード例 #3
0
        public override void HandleMessage(ComponentMessage message, IComponent component)
        {
            base.HandleMessage(message, component);

            switch (message)
            {
            case PlayerAttachedMsg _:
                if (!_overlayManager.HasOverlay(nameof(GasTileOverlay)))
                {
                    _overlayManager.AddOverlay(new GasTileOverlay());
                }
                break;

            case PlayerDetachedMsg _:
                if (!_overlayManager.HasOverlay(nameof(GasTileOverlay)))
                {
                    _overlayManager.RemoveOverlay(nameof(GasTileOverlay));
                }
                break;
            }
        }
コード例 #4
0
 public override void Shutdown()
 {
     base.Shutdown();
     _overlayManager.RemoveOverlay(_overlay);
 }
コード例 #5
0
 public override void Shutdown()
 {
     base.Shutdown();
     _overlay.RemoveOverlay <ParallaxOverlay>();
     _protoManager.PrototypesReloaded -= OnReload;
 }
コード例 #6
0
 private void OnPlayerDetached(EntityUid uid, DrunkComponent component, PlayerDetachedEvent args)
 {
     _overlay.CurrentBoozePower = 0;
     _overlayMan.RemoveOverlay(_overlay);
 }
コード例 #7
0
 private void OnPlayerDetached(EntityUid uid, BlindableComponent component, PlayerDetachedEvent args)
 {
     _overlayMan.RemoveOverlay(_overlay);
     _lightManager.Enabled = true;
 }
コード例 #8
0
 private void OnPlayerDetached(EntityUid uid, SeeingRainbowsComponent component, PlayerDetachedEvent args)
 {
     _overlay.Intoxication = 0;
     _overlayMan.RemoveOverlay(_overlay);
 }