ILoginService.cs 648 B

123456789101112131415161718192021222324252627282930313233
  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. yield return new WaitForSeconds(3);
  25. this.SendEvent<LoginSuccessEvent>();
  26. }
  27. }
  28. }