示例#1
0
 public void RemoveLastSave(DelegateCore.OnCallback saveGameData, DelegateCore.OnError error)
 {
     if (_gameServiceObj != null)
     {
         _gameServiceObj.Call("RemoveLastSave", new IGameServiceCallback(saveGameData.Invoke, error.Invoke));
     }
 }
示例#2
0
        /// <summary>
        /// With this command you can get the current version of the game service application
        /// </summary>
        /// <param name="version">the current version of the game service application</param>
        /// <param name="error">Error</param>
        public void GetAppVersion(DelegateCore.OnCallback version, 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;
            }

            if (_type == GameServiceType.Native)
            {
                if (FiroozehGameService.Configuration.EnableLog)
                {
                    LogUtil.LogError(Tag, "GetSDKVersion Only Available In AppMode");
                }
                return;
            }

            _gameServiceObj.Call("GetSDKVersion", new IGameServiceCallback(version.Invoke, error.Invoke));
        }
示例#3
0
 public void GetSDKVersion(DelegateCore.OnCallback version, DelegateCore.OnError error)
 {
     if (_gameServiceObj != null)
     {
         _gameServiceObj.Call("GetSDKVersion", new IGameServiceCallback(version.Invoke, error.Invoke));
     }
 }
示例#4
0
 public void DownloadObbData(
     string obbDataTag
     , DelegateCore.OnCallback downloadCallback
     , DelegateCore.OnError error)
 {
     if (_gameServiceObj != null)
     {
         _gameServiceObj.Call("DownloadObbDataFile"
                              , obbDataTag
                              , new IGameServiceCallback(downloadCallback.Invoke
                                                         , error.Invoke));
     }
 }
示例#5
0
        public void SubmitScore(
            string leaderBoardId,
            int scoreValue,
            DelegateCore.OnCallback callback,
            DelegateCore.OnError error)

        {
            if (_gameServiceObj != null)
            {
                _gameServiceObj.Call("SubmitScore"
                                     , leaderBoardId
                                     , scoreValue
                                     , _haveNotification
                                     , new IGameServiceCallback(callback.Invoke, error.Invoke));
            }
        }
示例#6
0
 public void SaveGame(
     string saveGameName
     , string saveGameDescription
     , string saveGameCover
     , string saveGameData
     , DelegateCore.OnCallback callback
     , DelegateCore.OnError error)
 {
     if (_gameServiceObj != null)
     {
         _gameServiceObj.Call("SaveData"
                              , saveGameName
                              , saveGameDescription
                              , saveGameCover
                              , saveGameData
                              , new IGameServiceCallback(callback.Invoke, error.Invoke));
     }
 }
示例#7
0
        /// <summary>
        /// This command can remove the last current user saved
        /// </summary>
        /// <param name="removeSave">removeSave Result ("Done" if Successful)</param>
        /// <param name="error">Error</param>
        public void RemoveLastSave(DelegateCore.OnCallback removeSave, 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("RemoveLastSave", new IGameServiceCallback(removeSave.Invoke, error.Invoke));
        }
 public IGameServiceCallback(DelegateCore.OnCallback callback, DelegateCore.OnError onError)
     : base("ir.firoozehcorp.gameservice.android.unity.Interfaces.IGameServiceCallback")
 {
     _oncallback = callback;
     _onError    = onError;
 }
 public IGameServiceCallback(DelegateCore.OnCallback callback, DelegateCore.OnError onError)
     : base("ir.FiroozehCorp.UnityPlugin.Interfaces.IGameServiceCallback")
 {
     _oncallback = callback;
     _onError    = onError;
 }