ILoginService.cs 721 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using Blue;
  3. using UnityEngine;
  4. namespace GHZLangChao
  5. {
  6. /// <summary>
  7. /// 登录成功事件
  8. /// </summary>
  9. public interface ILoginService : IService
  10. {
  11. void Login();
  12. }
  13. public class LoginService : ILoginService
  14. {
  15. public void OnInit()
  16. {
  17. }
  18. public void Login()
  19. {
  20. CoroutineSystem.Instance.Start_Coroutine(LoginImitate());
  21. }
  22. private IEnumerator LoginImitate()
  23. {
  24. UICallManager.Instance.MachineRoomInit(""); // 初始化
  25. yield return new WaitForSeconds(0.1f);
  26. this.SendEvent<LoginSuccessEvent>();
  27. }
  28. }
  29. }