using System.Collections;
using System.Collections.Generic;
using UnityEngine;
///
/// Switches on all objects in its list slowly, pausing two seconds on each one.
/// Used in the ZED planetarium sample to stagger the animations of the 18 SunBurstRoot objects on the sun.
///
public class SunBursts : MonoBehaviour
{
///
/// All objects to be turned on, in order. Script assumes they begin disabled.
///
[Tooltip("All objects to be turned on, in order. Script assumes they begin disabled.")]
public List sunBurstsGO = new List();
// Use this for initialization
IEnumerator Start ()
{
for (int i = 0; i < sunBurstsGO.Count; i++)
{
yield return new WaitForSeconds(2f);
sunBurstsGO[i].SetActive(true);
}
}
}