Esempio n. 1
0
    IEnumerator UpdateWindDirection(float timer = 30)
    {
        yield return(new WaitForSeconds(timer));

        dir       = (WindDir)System.Enum.GetValues(typeof(WindDir)).GetValue(Random.Range(0, 4));
        windSpeed = Random.Range(5, 18);
        StartCoroutine(UpdateWindDirection());
    }
Esempio n. 2
0
        /// <summary>
        /// The keys hash code.
        /// </summary>
        public override int GetHashCode()
        {
            int hashcode = 23;

            hashcode = (hashcode * 37) + Size.GetHashCode();
            hashcode = (hashcode * 37) + NumGrids.GetHashCode();
            hashcode = (hashcode * 37) + WindDir.GetHashCode();
            hashcode = (hashcode * 37) + SpectrumType.GetHashCode();

            return(AddToHashCode(hashcode));
        }
Esempio n. 3
0
 private void Awake()
 {
     this.fires = GameObject.FindGameObjectsWithTag("fire");
     this.WD    = GameObject.Find("GameManager").GetComponent <WindDir>();
 }
Esempio n. 4
0
 public override string ToString()
 {
     //handle error
     WindDir = WindDir.Replace("\n", "").Replace("\r", "");
     return(string.Join(", ", new object[] { DateTime, Temperature, DewPoint, Humidity, Pressure, WindDir, WindSpeed }));
 }
Esempio n. 5
0
 void Start()
 {
     dir = (WindDir)System.Enum.GetValues(typeof(WindDir)).GetValue(Random.Range(0, 4));
     StartCoroutine(UpdateWindDirection());
 }