123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using LitJson;
- using UnityEngine;
- using UnityEngine.EventSystems;
- using System;
- using System.Xml;
- using System.Collections;
- using System.Collections.Generic;
- public class Initializer : MonoBehaviour
- {
- #region
- public static List<Regist> RegistList;
- #endregion
- private void Awake()
- {
- RegistList = new List<Regist>();
- if (Bundle.Instance == null)
- {
- gameObject.AddScript<Bundle>();
- }
- if (Auxiliary.Instance == null)
- {
- gameObject.AddScript<Auxiliary>();
- }
- gameObject.AddScript<ManaReso>();
- gameObject.AddScript<ManaAnim>();
- gameObject.AddScript<ManaAudio>();
- gameObject.AddScript<ManaText>();
- gameObject.AddScript<ManaUI>();
- gameObject.AddScript<ManaSign>();
- gameObject.AddScript<ManaGarden>();
- gameObject.AddScript<ManaData>();
- gameObject.AddScript<ManaPlayer>();
- gameObject.AddScript<ManaDebug>();
- gameObject.AddScript<ManaMiniGame>();
- StartCoroutine(IInitialize());
- }
- public static void Initialize()
- {
- for (int i = 0; i < RegistList.Count; i++)
- {
- RegistList[i].Instantiate();
- RegistList[i].enabled = true;
- }
- for (int i = 0; i < RegistList.Count; i++)
- {
- RegistList[i].RegistReference();
- }
- for (int i = 0; i < RegistList.Count; i++)
- {
- RegistList[i].RegistValueA();
- }
- for (int i = 0; i < RegistList.Count; i++)
- {
- RegistList[i].RegistValueB();
- }
- for (int i = 0; i < RegistList.Count; i++)
- {
- RegistList[i].RegistValueC();
- }
- }
- public IEnumerator IInitialize()
- {
- while (Bundle.LoadComplete == false)
- {
- yield return null;
- }
- Initialize();
- }
- }
|