Rework latest version stuff and add splash texts & more

This commit is contained in:
2026-01-30 22:15:03 -07:00
parent d598c3bd79
commit e2a557812e
19 changed files with 1237 additions and 1094 deletions

View File

@@ -7,16 +7,23 @@ public class BouncyText : MonoBehaviour
[SerializeField] private float frequency = 2f;
[SerializeField] private float minSize = 10f;
[SerializeField] private float maxSize = 12f;
[SerializeField] private bool add;
private TextMeshProUGUI text;
private float startSize = 0;
void Start()
void Awake()
{
text = GetComponent<TextMeshProUGUI>();
if (add)
{
startSize = text.fontSize;
text.enableAutoSizing = false;
}
}
void Update()
{
float newsize = (Mathf.Sin(Time.time * frequency) + 1f) / 2f;
text.fontSize = Mathf.Lerp(minSize, maxSize, newsize);
text.fontSize = Mathf.Lerp(add ? startSize : minSize, maxSize + (add ? startSize : 0), newsize);
}
}