using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemiesManager : MonoBehaviour {

    public GameObject sharkPrefab;
    public float sharkSpawnInterval;

    private float lastSharkSpawnTime;


    void Start()
    {
        lastSharkSpawnTime = Time.time;
    }

    void FixedUpdate()
    {
        if (Time.time - lastSharkSpawnTime > sharkSpawnInterval)
        {
            lastSharkSpawnTime = Time.time;
            var shark = Instantiate(sharkPrefab, Vector2.right * 16f, Quaternion.identity);
        }
    }
}
