Format again

This commit is contained in:
Lncvrt committed 2026-03-06 12:28:02 -07:00
1 parent 3f6849060f
commit 78f3a8c04c
93 files changed
+7328 -7323

No files matched your search

+17 -17
View File
@@ -3,24 +3,24 @@ using UnityEngine;
[RequireComponent(typeof(TextMeshProUGUI))]
public class BouncyText : MonoBehaviour {
public float frequency = 2f;
public float minSize = 10f;
public float maxSize = 12f;
public bool add;
private TextMeshProUGUI text;
private float startSize = 0;
public float frequency = 2f;
public float minSize = 10f;
public float maxSize = 12f;
public bool add;
private TextMeshProUGUI text;
private float startSize = 0;
void Awake() {
text = GetComponent<TextMeshProUGUI>();
if (add) {
text.ForceMeshUpdate();
startSize = text.fontSize;
text.enableAutoSizing = false;
}
void Awake() {
text = GetComponent<TextMeshProUGUI>();
if (add) {
text.ForceMeshUpdate();
startSize = text.fontSize;
text.enableAutoSizing = false;
}
}
void Update() {
float newsize = (Mathf.Sin(Time.time * frequency) + 1f) / 2f;
text.fontSize = Mathf.Lerp(add ? startSize : minSize, maxSize + (add ? startSize : 0), newsize);
}
void Update() {
float newsize = (Mathf.Sin(Time.time * frequency) + 1f) / 2f;
text.fontSize = Mathf.Lerp(add ? startSize : minSize, maxSize + (add ? startSize : 0), newsize);
}
}