using System.Collections;
using UnityEngine;
public class SpownBombs : MonoBehaviour
{
public GameObject bomb;
void Start ()
{
StartCoroutine (Spawn ());
}
IEnumerator Spawn ()
{
while (!Player.lose)
{
Instantiate (bomb, new Vector2 (Random.Range (-2.5f, 2.5f), 5.9f), Quaternion.identity);
yield return new WaitForSeconds (1.2f);
}
}
}