using System.Collections; using UnityEngine; // ReSharper disable once CheckNamespace namespace BlueWaterProject { public class FishManager : Singleton { public void RespawnFish(GameObject fish, float delay, Vector3 respawnPos) { StartCoroutine(RespawnFishCoroutine(fish, delay, respawnPos)); } private IEnumerator RespawnFishCoroutine(GameObject fish, float delay, Vector3 respawnPos) { yield return new WaitForSeconds(delay); fish.transform.position = respawnPos; fish.SetActive(true); } } }