public static void LoginByPlatform(LoginByPlatformRequest request, Action<CloudGoodsUser> callback) { request.DeviceType = GetDeviceType(); CallHandler.Instance.LoginByPlatform(request, user => { _ActiveUser = user; callback(user); }); }
private void OnKongregateAPILoaded(string userInfoString) { Debug.Log("On API Loaded: " + userInfoString); string[] splitString = userInfoString.Split('|'); Debug.Log("User name: " + splitString[0]); Debug.Log("User Id: " + splitString[1]); Debug.Log("Game Token: " + splitString[2]); LoginByPlatformRequest request = new LoginByPlatformRequest() { AppId = CloudGoodsSettings.AppID, PlatformId = 2, PlatformUserId = splitString[1], UserName = splitString[0], DeviceType = 1 }; AccountServices.LoginByPlatform(request, OnUserLogin); }
public void LoginByPlatform(LoginByPlatformRequest request, Action<CloudGoodsUser> callback) { StartCoroutine(ServiceGetString(callObjectCreator.CreateLoginByPlatformCallObject(request), x => { callback(responseCreator.CreateLoginResponse(x)); })); }
public WWW CreateLoginByPlatformCallObject(LoginByPlatformRequest request) { return GenerateWWWPost("LoginByPlatform", request, false); }