private void Start() { windProducer = GetComponent <WindProducer>(); Debug.Log("windProducer = " + windProducer); windPointsBuffer = windProducer.GetWindFieldPointsBuffer(); StartCoroutine(UpdateVis()); }
//adds a wind producer to the corresponding (static or dynamic) wind field. public void Include(WindProducer windProducer) { switch (windProducer.mode) { case WindProducerMode.Static: staticWindProducers.Add(windProducer); break; case WindProducerMode.Dynamic: dynamicWindProducers.Add(windProducer); break; default: Debug.LogError("Trying to add a wind producer with an unhandled wind producer mode to this wind field." + "Did you add another mode and forget to update this function???"); break; } }
void Awake() { windProducer = GetComponent <WindProducer>(); }
protected override void OnEnable() { windProducer = GetComponent <WindProducer>(); base.OnEnable(); }