Make blurry vision darken the screen (#15926)

This commit is contained in:
Leon Friedrich
2023-04-30 13:44:01 +12:00
committed by GitHub
parent 6af0a91af3
commit 818f23352e

View File

@@ -55,11 +55,11 @@ namespace Content.Client.Eye.Blinding
// Maybe gradually shrink the view-size?
// Make the effect only apply to the edge of the viewport?
// Actually make it blurry??
var opacity = 0.5f * _magnitude / BlurryVisionComponent.MaxMagnitude;
var opacity = 0.75f * _magnitude / BlurryVisionComponent.MaxMagnitude;
var worldHandle = args.WorldHandle;
var viewport = args.WorldBounds;
worldHandle.SetTransform(Matrix3.Identity);
worldHandle.DrawRect(viewport, Color.White.WithAlpha(opacity));
worldHandle.DrawRect(viewport, Color.Black.WithAlpha(opacity));
}
}
}