using UnityEngine;
using System.Collections;

[System.Serializable]
public class ActiveList {
	public GameObject main;
	public GameObject[] activeList;
	public GameObject[] deactiveList;
	public float time = 5f;
}

public class CameraActiveList : MonoBehaviour {
	
	public ActiveList[] list;
	
	// Use this for initialization
	IEnumerator Start () {
		
		for(int i =0; i<list.Length; i++) {
			if(i>0)
				list[i-1].main.SetActive(false);
			list[i].main.SetActive(true);
			foreach(var a in list[i].activeList) {
				a.SetActive(true);
			}
			foreach(var d in list[i].deactiveList) {
				d.SetActive(false);
			}
			
			yield return new WaitForSeconds(list[i].time);
		}
		Debug.Log("finish");
		
		Application.LoadLevel("Main");
	}
	
	
}
