Initializer.cs 1.1 KB

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