private void Start()
 {
     windProducer = GetComponent <WindProducer>();
     Debug.Log("windProducer = " + windProducer);
     windPointsBuffer = windProducer.GetWindFieldPointsBuffer();
     StartCoroutine(UpdateVis());
 }
Exemplo n.º 2
0
        //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;
            }
        }
Exemplo n.º 3
0
 void Awake()
 {
     windProducer = GetComponent <WindProducer>();
 }
Exemplo n.º 4
0
 protected override void OnEnable()
 {
     windProducer = GetComponent <WindProducer>();
     base.OnEnable();
 }