GameStart.cs 841 B

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