public static bool Setup(string gameId, string wnsAppId, QGameKit.CaptureType captureType, QGameKit.UserAccountDelegate accountDelegate, QGameKit.Environment env) { QGameKit.QGameKitObj = QGameKitAndroidBridge.Setup(gameId, wnsAppId, captureType, accountDelegate, env); if (null == QGameKit.QGameKitObj) { Debug.LogError("QGameKitObj init failed!"); return(false); } QGameKit.UserAccount account = accountDelegate(); QGameKit.UpdateUserAccount(account); QGameKit.liveStatus = QGameKit.LiveStatus.Prepared; return(true); }
public void ToStart() { QGameKit.CaptureType captureType = (QGameKit.CaptureType) 10; QGameKit.Setup("1105309683", "203090", captureType, new QGameKit.UserAccountDelegate(BroadcastManager.UserAccountDelegate), QGameKit.Environment.Release); if (!BroadcastManager.enableDanku) { QGameKit.SetDanmakuEnabled(true); BroadcastManager.enableDanku = true; } QGameKit.SetLogDelegate(new QGameKit.LogDelegate(BroadcastManager.LogDelegate)); QGameKit.SetCommentReceiveDelegate(new QGameKit.CommentReceiveDelegate(BroadcastManager.CommentReceiveDelegate)); QGameKit.SetLiveStatusDelegate(new QGameKit.LiveStatusChangedDelegate(BroadcastManager.LiveStatusChangedDelegate)); QGameKit.SetShareDelegate(new QGameKit.ShareDelegate(BroadcastManager.ShareDelegate)); QGameKit.SetErrorCodeDelegate(new QGameKit.ErrorCodeListenerDelegate(BroadcastManager.ErrorCodeListenerDelegate)); }
public static QGameKitAndroidBridge Setup(string gameId, string wnsId, QGameKit.CaptureType captureType, QGameKit.UserAccountDelegate accountDelegate, QGameKit.Environment environmentType) { if (QGameKitAndroidBridge.singletonInstance != null) { return(QGameKitAndroidBridge.singletonInstance); } QGameKitAndroidBridge.gameID = gameId; QGameKitAndroidBridge.wnsID = wnsId; QGameKitAndroidBridge.myCaptureType = captureType; QGameKitAndroidBridge.userAccountDelegate = accountDelegate; QGameKitAndroidBridge.sdkEnvironmentType = environmentType; GameObject gameObject = new GameObject("QGameKitAndroidBridge"); UnityEngine.Object.DontDestroyOnLoad(gameObject); QGameKitAndroidBridge.singletonInstance = gameObject.AddComponent <QGameKitAndroidBridge>(); QGameKitAndroidBridge.singletonInstance.initSDK(); return(QGameKitAndroidBridge.singletonInstance); }