QDShareManagerInit.cs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // using System.Collections;
  2. // using cn.sharesdk.unity3d;
  3. // using UnityEngine;
  4. //
  5. // namespace GFGGame.Launcher
  6. // {
  7. // public class QDShareManagerInit : SingletonBase<QDShareManagerInit>
  8. // {
  9. // public IShareSDKListener shareSDKListener;
  10. //
  11. // public GameObject gameObject;
  12. //
  13. // public MobSDK mobsdk;
  14. //
  15. // public ShareSDK shareSDK;
  16. //
  17. // public void InitSDK()
  18. // {
  19. // ShareSDKKHandler eventHandler = GameObject.Find("ShareSDKGameObject")
  20. // ?.GetComponent<ShareSDKKHandler>();
  21. // if (eventHandler == null)
  22. // {
  23. // gameObject = new GameObject("ShareSDKGameObject");
  24. // gameObject.AddComponent<ShareSDKKHandler>();
  25. // GameObject.DontDestroyOnLoad(gameObject);
  26. // }
  27. //
  28. // GameObject mainCameraObject = GameObject.Find("GameLauncher");
  29. // mobsdk = mainCameraObject.GetComponent<MobSDK>();
  30. // shareSDK = mainCameraObject.GetComponent<ShareSDK>();
  31. // }
  32. //
  33. // public class ShareSDKKHandler : AbShareSDKHandler
  34. // {
  35. // public override void OnAuthResult(int reqID, ResponseState state, PlatformType type, Hashtable result)
  36. // {
  37. // Debug.Log($"OnAuthResult xx");
  38. // QDShareManagerInit.Instance.shareSDKListener.OnAuthResult(reqID, state, type, result);
  39. // }
  40. //
  41. // public override void OnGetUserInfoResult(int reqID, ResponseState state, PlatformType type,
  42. // Hashtable result)
  43. // {
  44. // Debug.Log($"OnGetUserInfoResult xx");
  45. // QDShareManagerInit.Instance.shareSDKListener.OnGetUserInfoResult(reqID, state, type, result);
  46. // }
  47. //
  48. // public override void OnShareResult(int reqID, ResponseState state, PlatformType type, Hashtable result)
  49. // {
  50. // Debug.Log($"OnShareResult xx" + (int)type);
  51. // QDShareManagerInit.Instance.shareSDKListener.OnShareResult(reqID, state, type, result);
  52. // }
  53. //
  54. // public override void OnGetFriendsResult(int reqID, ResponseState state, PlatformType type,
  55. // Hashtable result)
  56. // {
  57. // Debug.Log($"OnGetFriendsResult xx");
  58. // QDShareManagerInit.Instance.shareSDKListener.OnGetFriendsResult(reqID, state, type, result);
  59. // }
  60. //
  61. // public override void OnFollowFriendResult(int reqID, ResponseState state, PlatformType type,
  62. // Hashtable result)
  63. // {
  64. // Debug.Log($"OnFollowFriendResult xx");
  65. // QDShareManagerInit.Instance.shareSDKListener.OnFollowFriendResult(reqID, state, type, result);
  66. // }
  67. //
  68. // public override void OnIsClientValidForAndroidResult(int reqID, ResponseState state, PlatformType type,
  69. // Hashtable result)
  70. // {
  71. // Debug.Log($"OnIsClientValidForAndroidResult xx");
  72. // QDShareManagerInit.Instance.shareSDKListener
  73. // .OnIsClientValidForAndroidResult(reqID, state, type, result);
  74. // }
  75. // }
  76. // }
  77. // }