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