MultiplayerHUDManager.cs: fix text fade maybe

This commit is contained in:
JohnCorby 2023-05-11 17:10:35 -07:00
parent 6c68bd97e0
commit c763c24bd5

View File

@ -195,9 +195,9 @@ internal class MultiplayerHUDManager : MonoBehaviour, IAddComponentOnStart
_lastMessageTime = Time.time; _lastMessageTime = Time.time;
} }
if (Time.time > _lastMessageTime + FADE_DELAY if (!_writingMessage
&& !_writingMessage && Time.time > _lastMessageTime + FADE_DELAY
&& Time.time > _lastMessageTime + FADE_DELAY + FADE_TIME + 1) && Time.time < _lastMessageTime + FADE_DELAY + FADE_TIME + 1)
{ {
var difference = Time.time - (_lastMessageTime + FADE_DELAY); var difference = Time.time - (_lastMessageTime + FADE_DELAY);
var alpha = Mathf.Lerp(1, 0, difference / FADE_TIME); var alpha = Mathf.Lerp(1, 0, difference / FADE_TIME);