// Use this for initialization void Start() { _Instance = this; YouLiangDianMoveCtrl yldScript = null; for (int i = 0; i < 20; i++) { yldScript = YouLiangDianUICtrl.GetInstance().SpawnYouLiangDianUI(YouLiangDengJi.Level_1); XkGameCtrl.AddYLDLv(yldScript); yldScript.gameObject.SetActive(false); if (i < 5) { yldScript = YouLiangDianUICtrl.GetInstance().SpawnYouLiangDianUI(YouLiangDengJi.Level_2); XkGameCtrl.AddYLDLv(yldScript); yldScript.gameObject.SetActive(false); yldScript = YouLiangDianUICtrl.GetInstance().SpawnYouLiangDianUI(YouLiangDengJi.Level_3); XkGameCtrl.AddYLDLv(yldScript); yldScript.gameObject.SetActive(false); } } }