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(); } } }
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); } } }
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); }