using UnityEngine;
using System.Collections;

public class Cloud : MonoBehaviour {
    public Vector2 upperRightLimit = Vector2.one;
    public Vector2 lowerLeftLimit = Vector2.one;

    // Use this for initialization
    void Start () {
        this.transform.position = new Vector2(Random.Range(lowerLeftLimit.x, upperRightLimit.x), Random.Range(lowerLeftLimit.y, upperRightLimit.y));
        
        float r = Random.value;

        this.GetComponent<SpriteRenderer>().color = new Color(
                0.67f + 0.33f * (Mathf.FloorToInt(r * 10 % 2) == 0 ? 0 : 1),
                0.67f + 0.33f * (Mathf.FloorToInt(r * 100 % 2) == 0 ? 0 : 1),
                0.67f + 0.33f * (Mathf.FloorToInt(r * 1000 % 2) == 0 ? 0 : 1),
                Random.Range(0.5f,0.7f)
            );

        this.transform.rotation = Quaternion.Euler(0, 0, Random.Range(0f, 360f) );
	}
}
