void UpdateBar() { float fpRatio = fp.GetCurrentFP() / fp.GetMaxFP(); fpBar.transform.localScale = new Vector2(fpRatio, 1f); }