/// <summary> /// Remove a Property With propertyName /// </summary> /// <param name="propertyName">The name of a Property You Want To Remove it</param> public static void RemoveProperty(string propertyName) { if (!IsAvailable) { throw new GameServiceException("GsLiveRealtime is Not Available"); } if (!FiroozehGameService.Core.GameService.GSLive.IsRealTimeAvailable()) { throw new GameServiceException("RealTime is Not Available"); } _propertyHandler.RemoveProperty(CurrentPlayerMemberId, propertyName); var property = new PropertyData(propertyName); SenderUtil.NetworkProperty(property, PropertyAction.Remove); }
/// <summary> /// Apply a Property ,You Can Add or Edit A Property /// </summary> /// <param name="property">The Property You Want To Add or Edit</param> public static void SetProperty(Property property) { if (!IsAvailable) { throw new GameServiceException("GsLiveRealtime is Not Available"); } if (!FiroozehGameService.Core.GameService.GSLive.IsRealTimeAvailable()) { throw new GameServiceException("RealTime is Not Available"); } _propertyHandler.ApplyProperty(CurrentPlayerMemberId, property); var propertyData = new PropertyData(property.PropertyName, property.PropertyData); SenderUtil.NetworkProperty(propertyData, PropertyAction.Apply); }