コード例 #1
0
        /// <summary>
        /// With this command you can get list of all your game achievements
        /// that you have registered in the Developer panel.
        /// </summary>
        /// <param name="callback">List of achievements <see cref="DelegateCore.OnGetAchievement"/></param>
        /// <param name="error">Error</param>
        public void GetAchievements(DelegateCore.OnGetAchievement callback, 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("GetAchievements"
                                 , new IGameServiceCallback(onCallback =>
            {
                callback.Invoke(JsonConvert.DeserializeObject <List <Achievement> >(onCallback));
            }
                                                            , error.Invoke));
        }
コード例 #2
0
 public void GetAchievements(DelegateCore.OnGetAchievement callback, DelegateCore.OnError error)
 {
     if (_gameServiceObj != null)
     {
         _gameServiceObj.Call("GetAchievement"
                              , new IGameServiceCallback(Oncallback =>
         {
             callback.Invoke(JsonConvert.DeserializeObject <List <Achievement> >(Oncallback));
         }
                                                         , error.Invoke));
     }
 }