using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class GameManager : MonoBehaviour { public void StartTimeAction(float time, Action action) { StartCoroutine(TimeAction(time, action)); } IEnumerator TimeAction(float time, Action action) { yield return new WaitForSeconds(time); action(); } }