12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 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<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();
- }
- }
|