ScorePageToken.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // <copyright file="ScorePageToken.cs" company="Google Inc.">
  2. // Copyright (C) 2015 Google Inc. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. // </copyright>
  16. #if UNITY_ANDROID
  17. namespace GooglePlayGames.BasicApi
  18. {
  19. public enum ScorePageDirection
  20. {
  21. Forward = 1,
  22. Backward = 2,
  23. }
  24. /// <summary>
  25. /// Score page token. This holds the internal token used
  26. /// to page through the score pages. The id, collection, and
  27. /// timespan are added as a convience, and not actually part of the
  28. /// page token returned from the SDK.
  29. /// </summary>
  30. public class ScorePageToken
  31. {
  32. private string mId;
  33. private object mInternalObject;
  34. private LeaderboardCollection mCollection;
  35. private LeaderboardTimeSpan mTimespan;
  36. private ScorePageDirection mDirection;
  37. internal ScorePageToken(object internalObject, string id,
  38. LeaderboardCollection collection, LeaderboardTimeSpan timespan,
  39. ScorePageDirection direction)
  40. {
  41. mInternalObject = internalObject;
  42. mId = id;
  43. mCollection = collection;
  44. mTimespan = timespan;
  45. mDirection = direction;
  46. }
  47. public LeaderboardCollection Collection
  48. {
  49. get { return mCollection; }
  50. }
  51. public LeaderboardTimeSpan TimeSpan
  52. {
  53. get { return mTimespan; }
  54. }
  55. public ScorePageDirection Direction
  56. {
  57. get { return mDirection; }
  58. }
  59. public string LeaderboardId
  60. {
  61. get { return mId; }
  62. }
  63. internal object InternalObject
  64. {
  65. get { return mInternalObject; }
  66. }
  67. }
  68. }
  69. #endif