NULLSDKAndroid.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class NULLSDKAndroid : SDKBase
  5. {
  6. //ISDKCallBack sdkCB;
  7. public NULLSDKCBListener uLLSDKCBListener;
  8. public NULLSDKAndroid()
  9. {
  10. uLLSDKCBListener = SDKMgr.Instance.gameObject.AddComponent<NULLSDKCBListener>();
  11. SDKName = "PC";
  12. }
  13. public override void CreateRole()
  14. {
  15. GameRoleInfo gameRoleInfo = SDKMgr.Instance.GetGameRoleInfo();
  16. if (gameRoleInfo == null || !gameRoleInfo.Valid())
  17. {
  18. Debug.LogError("[NULLSDK][CreateRole] GameRoleInfo is null or not valid !!!");
  19. return;
  20. }
  21. Debug.LogWarning("[NULLSDK][CreateRole] current platform is not SDK !!!");
  22. }
  23. public override void EnterGame()
  24. {
  25. GameRoleInfo gameRoleInfo = SDKMgr.Instance.GetGameRoleInfo();
  26. if (gameRoleInfo == null || !gameRoleInfo.Valid())
  27. {
  28. Debug.LogError("[NULLSDK][EnterGame] GameRoleInfo is null or not valid !!!");
  29. return;
  30. }
  31. Debug.LogWarning("[NULLSDK][EnterGame] current platform is not SDK !!!");
  32. }
  33. public override void UpdateRoleLv()
  34. {
  35. GameRoleInfo gameRoleInfo = SDKMgr.Instance.GetGameRoleInfo();
  36. if (gameRoleInfo == null || !gameRoleInfo.Valid())
  37. {
  38. Debug.LogError("[NULLSDK][UpdateRoleLv] GameRoleInfo is null or not valid !!!");
  39. return;
  40. }
  41. Debug.LogWarning("[NULLSDK][UpdateRoleLv] current platform is not SDK !!!");
  42. }
  43. public override void ExitGame()
  44. {
  45. GameRoleInfo gameRoleInfo = SDKMgr.Instance.GetGameRoleInfo();
  46. if (gameRoleInfo == null || !gameRoleInfo.Valid())
  47. {
  48. Debug.LogError("[NULLSDK][ExitGame] GameRoleInfo is null or not valid !!!");
  49. return;
  50. }
  51. Debug.LogWarning("[NULLSDK][ExitGame] current platform is not SDK !!!");
  52. }
  53. public override bool Exit()
  54. {
  55. //throw new System.NotImplementedException();
  56. return false;
  57. }
  58. public override bool Quit()
  59. {
  60. return false;
  61. }
  62. public override void Init()
  63. {
  64. base.Init();
  65. //sdkCB = sdkcb;
  66. uLLSDKCBListener.InitSuccessCB(null);
  67. }
  68. public override void Login()
  69. {
  70. //throw new System.NotImplementedException();
  71. uLLSDKCBListener.LoginSucessCB(null);
  72. }
  73. public override void Logout()
  74. {
  75. //throw new System.NotImplementedException();
  76. }
  77. public override void Pay(int goodsId, string goodsName, string goodsDesc, int count, float amount, string cpOrderId, string extrasParams)
  78. {
  79. //throw new System.NotImplementedException();
  80. }
  81. public override void SwitchAccount()
  82. {
  83. //throw new System.NotImplementedException();
  84. }
  85. public override void CallInitSuccessCB()
  86. {
  87. SDKMgr.Instance.SetInited(true);
  88. SDKEventUtil.SendMessage(SDKCBEnum.INIT_SUCCESS_CB);
  89. }
  90. public override void CallLoginSuccessCB()
  91. {
  92. throw new System.NotImplementedException();
  93. }
  94. public override bool IsReportAction() { return true; }
  95. public override void ReportAction(Dictionary<object, object> datas)
  96. {
  97. base.ReportAction(datas);
  98. Debug.LogWarning("[NULLSDK][ReportAction] current platform is not SDK !!!");
  99. }
  100. }