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

public class SpawnCleaner : MonoBehaviour {
    public float threshold; // When to destroy object.

    public void Update () {
        if (transform.position.x < threshold)
            Destroy (transform.gameObject);
    }
}
