Beispiel #1
0
    /// <summary>
    ///  修改当前登录帐户昵称
    /// </summary>
    /// <param name="nickname">新昵称</param>
    /// <param name="obj">MonoBehaviour子类对象</param>
    /// <param name="callbackMethod">监听事件响应</param>
    public static void setNickname(string nickName, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
#if UNITY_ANDROID
        KTAccountManagerAndroid.setNickname(nickName, obj, callbackMethod);
#elif UNITY_IOS
        KTAccountManageriOS.setNickname(nickName, obj, callbackMethod);
#else
#endif
    }
Beispiel #2
0
    /// <summary>
    ///  使用网游帐户登录KTPlay平台
    /// </summary>
    /// <param name="gameUserId">游戏用户ID</param>
    /// <param name="obj">MonoBehaviour子类对象</param>
    /// <param name="callbackMethod">监听事件响应</param>
    public static void loginWithGameUser(string gameUserId, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
#if UNITY_ANDROID
        KTAccountManagerAndroid.loginWithGameUser(gameUserId, obj, callbackMethod);
#elif UNITY_IOS
        KTAccountManageriOS.loginWithGameUser(gameUserId, obj, callbackMethod);
#else
#endif
    }
Beispiel #3
0
    /// <summary>
    ///  打开KTPlay登录界面
    /// </summary>
    /// <param name="closeable">closeable 登录界面是否可由玩家关闭, YES 可以,NO 不可以</param>
    /// <param name="obj">MonoBehaviour子类对象</param>
    /// <param name="callbackMethod">监听事件响应</param>
    public static void ShowLoginView(bool closeable, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
#if UNITY_ANDROID
        KTAccountManagerAndroid.ShowLoginView(closeable, obj, callbackMethod);
#elif UNITY_IOS
        KTAccountManageriOS.ShowLoginView(closeable, obj, callbackMethod);
#else
#endif
    }
Beispiel #4
0
    /// <summary>
    ///  获取任意KTplay用户信息
    /// </summary>
    /// <param name="userId">KT用户唯一标示符</param>
    /// <param name="obj">MonoBehaviour子类对象</param>
    /// <param name="callbackMethod">监听事件响应</param>
    public static void UserProfile(string userId, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
#if UNITY_ANDROID
        KTAccountManagerAndroid.UserProfile(userId, obj, callbackMethod);
#elif UNITY_IOS
        KTAccountManageriOS.UserProfile(userId, obj, callbackMethod);
#else
#endif
    }
Beispiel #5
0
    /// <summary>
    ///  设置监听者,监听KTPlay登录状态变更
    /// </summary>
    /// <param name="obj">MonoBehaviour子类对象</param>
    /// <param name="callbackMethod">监听事件响应</param>
    public static void SetLoginStatusChange(MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
#if UNITY_ANDROID
        KTAccountManagerAndroid.SetLoginStatusChangeCallback(obj, callbackMethod);
#elif UNITY_IOS
        KTAccountManageriOS.SetLoginStatusChangeCallback(obj, callbackMethod);
#else
#endif
    }
Beispiel #6
0
 public static void ShowLoginView(bool closeable, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
 {
     if (obj != null && callbackMethod != null)
     {
         GameObject gameObj = obj.gameObject;
         if (gameObj != null && callbackMethod != null)
         {
             string methodName = ((System.Delegate)callbackMethod).Method.Name;
             if (methodName != null)
             {
                 KT_ShowLoginView(closeable, gameObj.name, methodName);
             }
         }
     }
 }
Beispiel #7
0
 public static void setNickname(string nickName, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
 {
     if (obj != null && callbackMethod != null)
     {
         GameObject gameObj = obj.gameObject;
         if (gameObj != null && callbackMethod != null)
         {
             string methodName = ((System.Delegate)callbackMethod).Method.Name;
             if (methodName != null)
             {
                 KT_SetNickName(gameObj.name, methodName, nickName);
             }
         }
     }
 }
Beispiel #8
0
 public static void loginWithGameUser(string gameUserId, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
 {
     if (obj != null && callbackMethod != null)
     {
         GameObject gameObj = obj.gameObject;
         if (gameObj != null && callbackMethod != null)
         {
             string methodName = ((System.Delegate)callbackMethod).Method.Name;
             if (methodName != null)
             {
                 KT_LoginWithGameUser(gameObj.name, methodName, gameUserId);
             }
         }
     }
 }
Beispiel #9
0
 public static void UserProfile(string userId, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
 {
     if (obj != null && callbackMethod != null)
     {
         GameObject gameObj = obj.gameObject;
         if (gameObj != null && callbackMethod != null)
         {
             string methodName = ((System.Delegate)callbackMethod).Method.Name;
             if (methodName != null)
             {
                 KT_UserProfileCallback(gameObj.name, methodName, userId);
             }
         }
     }
 }
Beispiel #10
0
 public static void SetLoginStatusChangeCallback(MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
 {
     if (obj != null && callbackMethod != null)
     {
         GameObject gameObj = obj.gameObject;
         if (gameObj != null && callbackMethod != null)
         {
             string methodName = ((System.Delegate)callbackMethod).Method.Name;
             if (methodName != null)
             {
                 KT_SetLoginStatusChangeCallback(gameObj.name, methodName);
             }
         }
     }
 }
Beispiel #11
0
    public static void setNickname(string nickName, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
        if (obj != null && callbackMethod != null)
        {
            GameObject gameObj = obj.gameObject;
            if (gameObj != null && callbackMethod != null)
            {
                string methodName = ((System.Delegate)callbackMethod).Method.Name;
                if (methodName != null)
                {
#if UNITY_ANDROID
                    KTPlayAndroid.joKTPlayAdapter.CallStatic("setNickName", nickName, gameObj.name, methodName);
#endif
                }
            }
        }
    }
Beispiel #12
0
    public static void SetLoginStatusChangeCallback(MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
        if (obj != null && callbackMethod != null)
        {
            GameObject gameObj = obj.gameObject;
            if (gameObj != null && callbackMethod != null)
            {
                string methodName = ((System.Delegate)callbackMethod).Method.Name;
                if (methodName != null)
                {
#if UNITY_ANDROID
                    KTPlayAndroid.joKTPlayAdapter.CallStatic("setLoginStatusChangedListener", gameObj.name, methodName);
#endif
                }
            }
        }
    }
Beispiel #13
0
    public static void ShowLoginView(bool closeable, MonoBehaviour obj, KTAccountManager.Callback callbackMethod)
    {
        if (obj != null && callbackMethod != null)
        {
            GameObject gameObj = obj.gameObject;
            if (gameObj != null && callbackMethod != null)
            {
                string methodName = ((System.Delegate)callbackMethod).Method.Name;
                if (methodName != null)
                {
#if UNITY_ANDROID
                    KTPlayAndroid.joKTPlayAdapter.CallStatic("showLoginView", closeable, gameObj.name, methodName);
#endif
                }
            }
        }
    }