using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PipeGenEasy : MonoBehaviour
{
[SerializeField] GameObject pipes;
int timer = 100;
void FixedUpdate() {
timer++;
if(timer >= 50)
{
timer = 0;
GameObject pipe = Instantiate(pipes, new Vector2(pipes.transform.position.x,pipes.transform.position.y + Random.Range(-2, 2)), pipes.transform.rotation);
Destroy(pipe, 10);
}
}
}