22 lines
629 B
C#
22 lines
629 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
// ReSharper disable once CheckNamespace
|
|
namespace BlueWaterProject
|
|
{
|
|
public class FishManager : Singleton<FishManager>
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
} |