GameStart.cs 999 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Reflection;
  3. using UnityEngine;
  4. using UnityEngine.Playables;
  5. public class GameStart : MonoBehaviour
  6. {
  7. public ShaderVariantCollection ShaderVariantCollection;
  8. public LoadType LoadType;
  9. public string h5Url;
  10. private GameStartUIPanel _gameStartUIPanel;
  11. [ContextMenu("asdada")]
  12. public void Test()
  13. {
  14. }
  15. public void Start()
  16. {
  17. ShaderVariantCollection.WarmUp();
  18. _gameStartUIPanel = GetComponent<GameStartUIPanel>();
  19. StartLoadGame();
  20. }
  21. private void StartLoadGame()
  22. {
  23. string typeName = "GameApplction";
  24. // lock (ActivatorLoock)
  25. {
  26. Assembly assembly = Assembly.Load("Fort23.Mono");
  27. System.Type type = assembly.GetType(typeName);
  28. IGameStart iGameStart = System.Activator.CreateInstance(type) as IGameStart;
  29. iGameStart.StartGame(LoadType, h5Url, _gameStartUIPanel, delegate { gameObject.SetActive(false); });
  30. }
  31. }
  32. }