Beispiel #1
0
    IEnumerator Flick()
    {
        float nextInterval;

        while (on)
        {
            nextInterval = RandomInterval();
            Douple douple = Randomize();
            SetAttributes(me, douple);
            if (children.Count > 0)
            {
                foreach (Light spookyLight in children)
                {
                    SetAttributes(spookyLight, douple);
                }
            }
            yield return(new WaitForSeconds(nextInterval));
        }
    }
Beispiel #2
0
 void SetAttributes(Light spookyLight, Douple input)
 {
     spookyLight.intensity = input.intensity;
     spookyLight.range     = input.range;
 }