12345678910111213141516171819202122232425262728 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class UpdateManager : MonoBehaviour
- {
- public float time = 60;
- // Start is called before the first frame update
- void Start()
- {
- StartCoroutine(updateTime());
- }
- IEnumerator updateTime()
- {
- while(true)
- {
- updateData();
- yield return new WaitForSeconds(time);
- }
- }
- public virtual void updateData()
- {
- }
- }
|