示例#1
0
    public void onCreateLinkingCancel(string result)
    {
        Debug.Log("GamePotEventListener::onCreateLinkCancel()" + result);

        if (cbCreateLinking != null)
        {
            cbCreateLinking(NCommon.ResultLinking.CANCELLED);
            cbCreateLinking = null;
        }
        else
        {
            if (GamePotInterface != null)
            {
                GamePotInterface.onCreateLinkingCancel();
            }
        }
    }
示例#2
0
    public void onCreateLinkingFailure(string result)
    {
        Debug.Log("GamePotEventListener::onCreateLinkFailure() - " + result);
        NError error = JsonMapper.ToObject <NError>(result);

        if (cbCreateLinking != null)
        {
            cbCreateLinking(NCommon.ResultLinking.FAILED, null, error);
            cbCreateLinking = null;
        }
        else
        {
            if (GamePotInterface != null)
            {
                GamePotInterface.onCreateLinkingFailure(error);
            }
        }
    }
示例#3
0
    public void onCreateLinkingSuccess(string result)
    {
        Debug.Log("GamePotEventListener::onCreateLinkSuccess() - " + result);
        NUserInfo userInfo = JsonMapper.ToObject <NUserInfo>(result);

        if (cbCreateLinking != null)
        {
            cbCreateLinking(NCommon.ResultLinking.SUCCESS, userInfo);
            cbCreateLinking = null;
        }
        else
        {
            if (GamePotInterface != null)
            {
                GamePotInterface.onCreateLinkingSuccess(userInfo);
            }
        }
    }
 /// <summary>
 /// Create Linking (callback delegate)
 /// </summary>
 /// <param name="linkType"></param>
 /// <param name="cbCreateLinking">Callback Function</param>
 public static void createLinking(NCommon.LinkingType linkType, GamePotCallbackDelegate.CB_CreateLinking cbCreateLinking)
 {
     GamePotEventListener.cbCreateLinking = cbCreateLinking;
     createLinking(linkType);
 }