Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

143 linhas
2.2 KiB

  1. using System;
  2. using UnityEngine;
  3. namespace SUISS.Promo
  4. {
  5. [Serializable]
  6. public class SparkSocGame
  7. {
  8. public void Initialise(string refererLink, bool isInstalled, SparkSocGames.OpenAppInStoreDelegate openAppInStore)
  9. {
  10. this.refererLink = refererLink;
  11. this.IsInstalled = isInstalled;
  12. this.openAppInStore = openAppInStore;
  13. }
  14. public void SetAppIcon(Texture2D icon)
  15. {
  16. this.AppIcon = icon;
  17. }
  18. public void SetPromoImage(Texture2D image)
  19. {
  20. this.PromoImage = image;
  21. }
  22. public void SetBannerImage(Texture2D image)
  23. {
  24. this.BannerImage = image;
  25. }
  26. public void OpenInAppStore()
  27. {
  28. if (this.openAppInStore != null)
  29. {
  30. this.openAppInStore(this.AppId, this.downloadUrl, this.refererLink);
  31. }
  32. }
  33. public int Factor
  34. {
  35. get
  36. {
  37. return this.factor;
  38. }
  39. }
  40. public string DisplayName
  41. {
  42. get
  43. {
  44. return this.displayName;
  45. }
  46. }
  47. public string AppIconUrl
  48. {
  49. get
  50. {
  51. return this.appIconUrl;
  52. }
  53. }
  54. public string LargeImageUrl
  55. {
  56. get
  57. {
  58. return this.largeImageUrl;
  59. }
  60. }
  61. public string BannerUrl
  62. {
  63. get
  64. {
  65. return this.bannerUrl;
  66. }
  67. }
  68. public string AppId
  69. {
  70. get
  71. {
  72. return this.appId;
  73. }
  74. }
  75. public Texture2D AppIcon { get; private set; }
  76. public Texture2D PromoImage { get; private set; }
  77. public Texture2D BannerImage { get; private set; }
  78. public bool IsInstalled { get; private set; }
  79. public string PackageName
  80. {
  81. get
  82. {
  83. return this.packageName;
  84. }
  85. }
  86. public string ProductId
  87. {
  88. get
  89. {
  90. return this.productId;
  91. }
  92. }
  93. [SerializeField]
  94. private int factor;
  95. [SerializeField]
  96. private string packageName;
  97. [SerializeField]
  98. private string displayName;
  99. [SerializeField]
  100. private string appIconUrl;
  101. [SerializeField]
  102. private string largeImageUrl;
  103. [SerializeField]
  104. private string bannerUrl;
  105. [SerializeField]
  106. private string downloadUrl;
  107. [SerializeField]
  108. private string appId;
  109. [SerializeField]
  110. private string productId;
  111. private SparkSocGames.OpenAppInStoreDelegate openAppInStore;
  112. private string refererLink;
  113. }
  114. }