示例#1
0
 public void ReceiveFlash(double duration)
 {
     _displayManager.Screenshot(ScreenshotType.BeforeUI, image =>
     {
         var rgba32Image    = image.CloneAs <Rgba32>(Configuration.Default);
         _screenshotTexture = _displayManager.LoadTextureFromImage(rgba32Image);
     });
     _startTime = _gameTiming.CurTime.TotalSeconds;
     _lastsFor  = duration;
 }
示例#2
0
        public FlashOverlay() : base(nameof(SharedOverlayID.FlashOverlay))
        {
            IoCManager.InjectDependencies(this);
            _shader = _prototypeManager.Index <ShaderPrototype>("FlashedEffect").Instance().Duplicate();

            _startTime = _gameTiming.CurTime.TotalMilliseconds;
            _displayManager.Screenshot(ScreenshotType.BeforeUI, image =>
            {
                var rgba32Image    = image.CloneAs <Rgba32>(Configuration.Default);
                _screenshotTexture = _displayManager.LoadTextureFromImage(rgba32Image);
            });
        }