Пример #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());
    }
Пример #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));
        }
Пример #3
0
 private void Awake()
 {
     this.fires = GameObject.FindGameObjectsWithTag("fire");
     this.WD    = GameObject.Find("GameManager").GetComponent <WindDir>();
 }
Пример #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 }));
 }
Пример #5
0
 void Start()
 {
     dir = (WindDir)System.Enum.GetValues(typeof(WindDir)).GetValue(Random.Range(0, 4));
     StartCoroutine(UpdateWindDirection());
 }