using UnityEngine;
using System.Collections;

public class CloudSpawner : MonoBehaviour {
    public GameObject cloud;
    public int cloudCount = 10;
    public Transform levelStart;
    public Transform levelEnd;

    void Start() {
        for (int i = 0; i < cloudCount; i++) {
            GameObject go = Instantiate(cloud);
            Vector3 pos = new Vector3(Random.Range(levelStart.position.x, levelEnd.position.x), Random.Range(go.transform.position.y - 5f, go.transform.position.y + 5f), Random.Range(go.transform.position.z - 2f, go.transform.position.z + 10f));
            go.transform.position = pos;
            // go.transform.localScale = new Vector3(Random.Range(go.transform.localScale.x - 1f, go.transform.localScale.x + 1f), Random.Range(go.transform.localScale.y - 1f, go.transform.localScale.y + 1f), go.transform.localScale.z);
        }
    }

    void Update() {
    }
}
