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

namespace Caper {
    public class WindRandomizer : MonoBehaviour {
        Wind wind;
        // Use this for initialization
        void Start() {
            wind = GetComponent<Wind>();
            StartCoroutine(Randomize());
        }

        IEnumerator Randomize() {
            while (true) {
                wind.direction = (WindDirection)Random.Range(0, 8);
                wind.intensity = Random.Range(0f, 0.7f);
                wind.areaSize = Random.Range(50f, 300f);
                yield return new WaitForSeconds(Random.Range(20f, 60f));
            }
        }
    }
}
