ScoutStatusPanel.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. using System;
  2. using I2.Loc;
  3. using MaidStatus;
  4. using UnityEngine;
  5. using wf;
  6. namespace scoutmode
  7. {
  8. public class ScoutStatusPanel : MonoBehaviour
  9. {
  10. public bool visible
  11. {
  12. get
  13. {
  14. return base.gameObject.activeSelf;
  15. }
  16. set
  17. {
  18. base.gameObject.SetActive(value);
  19. }
  20. }
  21. public void SetDrawStatus(ScoutMaidData scoutMaid)
  22. {
  23. if (scoutMaid == null)
  24. {
  25. return;
  26. }
  27. ScoutMaidData.SimpleStatus status = scoutMaid.status;
  28. if (this.charaThumbnailSprite.sprite2D != null)
  29. {
  30. UnityEngine.Object.Destroy(this.charaThumbnailSprite.sprite2D.texture);
  31. }
  32. byte[] iconImageBinary = scoutMaid.iconImageBinary;
  33. if (iconImageBinary != null)
  34. {
  35. Texture2D texture2D = new Texture2D(1, 1, TextureFormat.ARGB32, false);
  36. texture2D.LoadImage(iconImageBinary);
  37. this.charaThumbnailSprite.sprite2D = Sprite.Create(texture2D, new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), default(Vector2));
  38. this.charaThumbnailSprite.SetDimensions(this.charaThumbnailSprite.sprite2D.texture.width, this.charaThumbnailSprite.sprite2D.texture.height);
  39. }
  40. this.charaName1.text = status.name1;
  41. this.charaName2.text = status.name2;
  42. this.heroineType.GetComponent<UILabel>().text = status.personal.drawName;
  43. Utility.SetLocalizeTerm(this.heroineType, status.personal.termName, false);
  44. this.seikeiken.GetComponent<UILabel>().text = EnumConvert.GetString(status.seikeiken);
  45. Utility.SetLocalizeTerm(this.seikeiken, EnumConvert.GetTerm(status.seikeiken), false);
  46. this.height.text = status.height.ToString();
  47. this.weight.text = status.weight.ToString();
  48. this.bust.text = status.bust.ToString();
  49. this.cup.text = status.cup;
  50. this.waist.text = status.waist.ToString();
  51. this.hip.text = status.hip.ToString();
  52. this.lovely.text = status.lovely.ToString();
  53. this.elegance.text = status.elegance.ToString();
  54. this.charm.text = status.charm.ToString();
  55. this.care.text = status.care.ToString();
  56. this.reception.text = status.reception.ToString();
  57. this.cooking.text = status.cooking.ToString();
  58. this.dance.text = status.dance.ToString();
  59. this.vocal.text = status.vocal.ToString();
  60. this.teachRate.text = ((int)System.Math.Floor((double)status.teachRate / 10.0)).ToString();
  61. this.studyRate.text = ((int)System.Math.Floor((double)status.studyRate / 10.0)).ToString();
  62. this.inyoku.text = status.inyoku.ToString();
  63. this.mValue.text = status.mvalue.ToString();
  64. this.hentai.text = status.hentai.ToString();
  65. this.housi.text = status.housi.ToString();
  66. this.yotogiPlayCount.text = status.playCountYotogi.ToString();
  67. }
  68. [SerializeField]
  69. private UI2DSprite charaThumbnailSprite;
  70. [SerializeField]
  71. private UILabel charaName1;
  72. [SerializeField]
  73. private UILabel charaName2;
  74. [SerializeField]
  75. private Localize heroineType;
  76. [SerializeField]
  77. private Localize seikeiken;
  78. [SerializeField]
  79. private UILabel height;
  80. [SerializeField]
  81. private UILabel weight;
  82. [SerializeField]
  83. private UILabel bust;
  84. [SerializeField]
  85. private UILabel cup;
  86. [SerializeField]
  87. private UILabel waist;
  88. [SerializeField]
  89. private UILabel hip;
  90. [SerializeField]
  91. private UILabel lovely;
  92. [SerializeField]
  93. private UILabel elegance;
  94. [SerializeField]
  95. private UILabel charm;
  96. [SerializeField]
  97. private UILabel care;
  98. [SerializeField]
  99. private UILabel reception;
  100. [SerializeField]
  101. private UILabel cooking;
  102. [SerializeField]
  103. private UILabel dance;
  104. [SerializeField]
  105. private UILabel vocal;
  106. [SerializeField]
  107. private UILabel teachRate;
  108. [SerializeField]
  109. private UILabel studyRate;
  110. [SerializeField]
  111. private UILabel inyoku;
  112. [SerializeField]
  113. private UILabel mValue;
  114. [SerializeField]
  115. private UILabel hentai;
  116. [SerializeField]
  117. private UILabel housi;
  118. [SerializeField]
  119. private UILabel yotogiPlayCount;
  120. }
  121. }