private void OnDrawGizmos() { if (displayWindArrows) { DrawWindPoints(windProducer.GetWindFieldPointsBuffer()); } }
private void Start() { windProducer = GetComponent <WindProducer>(); Debug.Log("windProducer = " + windProducer); windPointsBuffer = windProducer.GetWindFieldPointsBuffer(); StartCoroutine(UpdateVis()); }
//Updates wind data for visualisation. Does not draw it (visualisation must be drawn every frame or will get flickering) private IEnumerator UpdateVis() { while (showWindArrows) { windPointsBuffer = windProducer.GetWindFieldPointsBuffer(); yield return(new WaitForSecondsRealtime(updateInterval)); } yield return(new WaitForSecondsRealtime(updateInterval)); }