Initializer.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using LitJson;
  3. using UnityEngine;
  4. using UnityEngine.EventSystems;
  5. using System.Xml;
  6. using System.Collections;
  7. using System.Collections.Generic;
  8. public class Initializer : MonoBehaviour
  9. {
  10. #region
  11. public static List<Regist> RegistList;
  12. #endregion
  13. private void Start()
  14. {
  15. RegistList = new List<Regist>();
  16. gameObject.AddScript<ManaReso>();
  17. gameObject.AddScript<ManaAnim>();
  18. gameObject.AddScript<ManaAudio>();
  19. gameObject.AddScript<ManaUI>();
  20. gameObject.AddScript<ManaGarden>();
  21. gameObject.AddScript<ManaData>();
  22. gameObject.AddScript<ManaPlayer>();
  23. gameObject.AddScript<ManaDebug>();
  24. gameObject.AddScript<ManaMiniGame>();
  25. for (int i = 0; i < RegistList.Count; i++)
  26. {
  27. RegistList[i].RegistReference();
  28. }
  29. for (int i = 0; i < RegistList.Count; i++)
  30. {
  31. RegistList[i].RegistValueA();
  32. }
  33. for (int i = 0; i < RegistList.Count; i++)
  34. {
  35. RegistList[i].RegistValueB();
  36. }
  37. for (int i = 0; i < RegistList.Count; i++)
  38. {
  39. RegistList[i].RegistValueC();
  40. }
  41. }
  42. }