using UnityEngine;
using System.Collections;
public class Mechanics : MonoBehaviour {
public GameObject enemyObject;
// Use this for initialization
void Start () {
InvokeRepeating (“spawnEnemys”,5,8);
}
// Update is called once per frame
void Update () {
}
void spawnEnemys () {
Instantiate (enemyObject, new Vector3(11, (int)Random.Range (-4.25f, 4.25f)));
}
}