From bd9b653065063fbb13b6a8a56d86a46405d7d268 Mon Sep 17 00:00:00 2001 From: vitellaryjr <43586575+vitellaryjr@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:03:43 -0700 Subject: [PATCH] ease scaling --- Code/RoomNameDisplay.cs | 7 +++++++ Code/RoomNameTrigger.cs | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Code/RoomNameDisplay.cs b/Code/RoomNameDisplay.cs index 204a43d..ed35995 100644 --- a/Code/RoomNameDisplay.cs +++ b/Code/RoomNameDisplay.cs @@ -32,6 +32,8 @@ public class RoomNameDisplay : Entity private float nextOutline; public float scale; + public float prevScale; + public float nextScale; private float outTimer; public RoomNameDisplay() { @@ -41,6 +43,9 @@ public RoomNameDisplay() { textLerp = 0f; colorLerp = 1f; outTimer = 0f; + scale = 1f; + prevScale = 1f; + nextScale = 1f; bgColor = Color.Black; textColor = Color.White; @@ -78,6 +83,7 @@ public override void Update() if (text == nextText) { textLerp = Calc.Approach(textLerp, 1f, Engine.DeltaTime * speed); + scale = Calc.LerpClamp(prevScale, nextScale, Ease.CubeOut(textLerp)); } else { @@ -208,6 +214,7 @@ public void SetInstant() drawLerp = 1f; colorLerp = 1f; textLerp = 1f; + scale = nextScale; } } diff --git a/Code/RoomNameTrigger.cs b/Code/RoomNameTrigger.cs index a479606..ea7bec7 100644 --- a/Code/RoomNameTrigger.cs +++ b/Code/RoomNameTrigger.cs @@ -49,7 +49,8 @@ public override void OnEnter(Player player) display.SetColor(textColor, bgColor, lineColor, lineAmt); display.SetTimer(Math.Max(timer, 0f)); display.nextOffset = yOffset; - display.scale = scale; + display.prevScale = display.scale; + display.nextScale = scale; if (instant) { display.SetInstant();