using System.Collections; using UnityEngine; public class TopMoney : MonoBehaviourSingletonTemplate { public MoneyForm[] moneys; // 0 젬, 1 골드 private void OnEnable() { StartCoroutine(Co_Update()); } IEnumerator Co_Update() { while (true) { Set(); yield return new WaitForSeconds(1f); } } public void Set() { moneys[0].Set(1); moneys[1].Set(2); } }