private void OnSaveResult(string sourcesData) { string[] sources = IOSNative.ParseArray(sourcesData); ReplayKitVideoShareResult result = new ReplayKitVideoShareResult(sources); ActionShareDialogFinished(result); }
private void OnSaveResult(string sourcesData) { _IsRecording = false; string[] sources = IOSNative.ParseArray(sourcesData); ReplayKitVideoStopResult result = new ReplayKitVideoStopResult(sources); ActionRecordStoped(result); }
//-------------------------------------- // Internal Events //-------------------------------------- /* * Save */ private void OnSaveRecordSuccess(string data) { string[] values = IOSNative.ParseArray(data); int dbId = System.Convert.ToInt32(values[0]); int recordId = System.Convert.ToInt32(values[1]); CK_Database db = CK_Database.GetDatabaseByInternalId(dbId); CK_RecordResult result = new CK_RecordResult(recordId); db.FireSaveRecordResult(result); }
public GK_RTM_Match(string matchData) { string[] MatchData = matchData.Split(new string[] { IOSNative.DATA_SPLITTER2 }, StringSplitOptions.None); _ExpectedPlayerCount = Convert.ToInt32(MatchData[0]); string[] playersIds = IOSNative.ParseArray(MatchData[1]); foreach (string playerId in playersIds) { GK_Player player = GameCenterManager.GetPlayerById(playerId); _Players.Add(player); } }
private void OnPlayerRequestedMatchWithRecipients_TBM(string data) { Debug.Log("OnPlayerRequestedMatchWithRecipients_TBM"); string[] playersIds = IOSNative.ParseArray(data); List <GK_Player> players = new List <GK_Player>(); foreach (string playerId in playersIds) { players.Add(GameCenterManager.GetPlayerById(playerId)); } ActionPlayerRequestedMatchWithRecipients(GK_MatchType.RealTime, playersIds, players.ToArray()); }
//-------------------------------------- // Internal Use Only //-------------------------------------- public void UpdateRecord() { List <string> keys = new List <string>(); List <string> values = new List <string>(); foreach (KeyValuePair <string, string> pair in _Data) { keys.Add(pair.Key); values.Add(pair.Value); } ISN_CloudKit.UpdateRecord_Object(Internal_Id, Type, IOSNative.SerializeArray(keys.ToArray()), IOSNative.SerializeArray(values.ToArray()), Id.Internal_Id); }
public void SendData(byte[] data, GK_MatchSendDataMode dataMode, params GK_Player[] players) { #if (UNITY_IPHONE && !UNITY_EDITOR && GAME_CENTER_ENABLED) || SA_DEBUG_MODE string bytesString = System.Convert.ToBase64String(data); List <string> playersIds = new List <string>(); foreach (GK_Player player in players) { playersIds.Add(player.Id); } ISN_RTM_SendData(bytesString, IOSNative.SerializeArray(playersIds.ToArray()), (int)dataMode); #endif }
/// <summary> /// Resolves any conflicting saved games.. /// /// This method takes an array of GK_SavedGame objects that contain conflicting saved game files and creates a /// new array that contains the resolved conflicts. All saved game conflicts are resolved and added to the /// conflicts array in the completion handler. Call this method separately for each set of saved game conflicts. /// For example, if you have multiple saved game files with the name of “savedgame1” and “savedgame2”, you /// need to call this method twice—once with an array containing the GK_SavedGame objects with the “savedgame1 /// ame and once for the “savedgame2” objects. All saved game conflicts are resolved asynchronously. /// /// <param name="conflicts">An list of GK_SavedGame objects containing the conflicting saved games to be deleted.</param> /// <param name="data">An object that contains the saved game data.</param> /// </summary> public void ResolveConflictingSavedGames(List <GK_SavedGame> conflicts, byte[] data) { #if (UNITY_IPHONE && !UNITY_EDITOR) || SA_DEBUG_MODE string bytesString = System.Convert.ToBase64String(data); List <string> savesKeys = new List <string>(); foreach (GK_SavedGame save in conflicts) { savesKeys.Add(save.Id); } string savesList = IOSNative.SerializeArray(savesKeys.ToArray()); _ISN_ResolveConflictingSavedGames(savesList, bytesString); #endif }
public void OnDialogPopUpCallBack(string buttonIndex) { int index = System.Convert.ToInt16(buttonIndex); switch (index) { case 0: IOSNative.RedirectToWebPage(urlString); RaiseOnOnDialogPopupComplete(MessageState.YES); break; case 1: RaiseOnOnDialogPopupComplete(MessageState.NO); break; } Destroy(gameObject); }
public void OnRatePopUpCallBack(string buttonIndex) { int index = System.Convert.ToInt16(buttonIndex); switch (index) { case 0: IOSNative.RedirectToAppStoreRatingPage(appleId); RaiseOnOnRateUSPopupComplete(MessageState.RATED); break; case 1: RaiseOnOnRateUSPopupComplete(MessageState.REMIND); break; case 2: RaiseOnOnRateUSPopupComplete(MessageState.DECLINED); break; } Destroy(gameObject); }
public void Soft() { IOSNative.StartHapticFeedback(HapticFeedbackTypes.SOFT); }
public void Medium() { IOSNative.StartHapticFeedback(HapticFeedbackTypes.MEDIUM); }
public void FindMatch(int minPlayers, int maxPlayers, string msg = "", string[] playersToInvite = null) { #if (UNITY_IPHONE && !UNITY_EDITOR && GAME_CENTER_ENABLED) || SA_DEBUG_MODE _ISN_RTM_FindMatch(minPlayers, maxPlayers, msg, IOSNative.SerializeArray(playersToInvite)); #endif }
public void Heavy() { IOSNative.StartHapticFeedback(HapticFeedbackTypes.HEAVY); }
public void init() { IOSNative.showMessage(title, message, ok); }
public void init() { IOSNative.showDialog(title, message, yes, no); }
public void Light() { IOSNative.StartHapticFeedback(HapticFeedbackTypes.LIGHT); }
public void init() { IOSNative.showRateUsPopUP(title, message, rate, remind, declined); }
public void Rigid() { IOSNative.StartHapticFeedback(HapticFeedbackTypes.RIGID); }
public void FindMatchWithNativeUI(int minPlayers, int maxPlayers, string msg = "", string[] playersToInvite = null) { #if (UNITY_IPHONE && !UNITY_EDITOR) || SA_DEBUG_MODE _ISN_TBM_FindMatchWithNativeUI(minPlayers, maxPlayers, msg, IOSNative.SerializeArray(playersToInvite)); #endif }
public void SetCollection(params string[] itemIds) { #if (UNITY_IPHONE && !UNITY_EDITOR) || SA_DEBUG_MODE _ISN_SetCollection(IOSNative.SerializeArray(itemIds)); #endif }
public void FindMatch(int minPlayers, int maxPlayers, string msg = "", string[] invitations = null) { #if (UNITY_IPHONE && !UNITY_EDITOR) || SA_DEBUG_MODE _ISN_RTM_FindMatch(minPlayers, maxPlayers, msg, IOSNative.SerializeArray(invitations)); #endif }