/// <summary> /// With this command you can get information about the current player is playing /// </summary> /// <param name="saveGameData">the current player is playing<see cref="DelegateCore.OnGetUserData"/></param> /// <param name="error">Error</param> public void GetUserData(DelegateCore.OnGetUserData saveGameData, DelegateCore.OnError error) { if (_gameServiceObj == null) { if (_isAvailable) { if (FiroozehGameService.Configuration.EnableLog) { LogUtil.LogError(Tag, "GameService Is NotAvailable yet"); } } else { if (FiroozehGameService.Configuration.EnableLog) { LogUtil.LogError(Tag, "You Logout Before ,You Must Config it Again..."); } } return; } _gameServiceObj.Call("GetUserData", new IGameServiceCallback(r => { saveGameData.Invoke(JsonConvert.DeserializeObject <User>(r)); }, error.Invoke)); }
public void GetUserData(DelegateCore.OnGetUserData saveGameData, DelegateCore.OnError error) { if (_gameServiceObj != null) { _gameServiceObj.Call("GetUserData", new IGameServiceCallback(r => { saveGameData.Invoke(JsonConvert.DeserializeObject <User>(r)); }, error.Invoke)); } }