StoryTalkItem_Generate.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. ---@class StoryTalkItem__Generate_talkRgt_dsc
  2. ---@field public gameObject UnityEngine.GameObject
  3. ---@field public rectTransform UnityEngine.RectTransform
  4. ---@field public text UnityEngine.UI.Text
  5. ---@class StoryTalkItem__Generate_talkRgt_text
  6. ---@field public gameObject UnityEngine.GameObject
  7. ---@field public text UnityEngine.UI.Text
  8. ---@class StoryTalkItem__Generate_talkRgt_bg
  9. ---@field public gameObject UnityEngine.GameObject
  10. ---@field public image UnityEngine.UI.Image
  11. ---@class StoryTalkItem__Generate_talkRgt
  12. ---@field public gameObject UnityEngine.GameObject
  13. ---@field public rectTransform UnityEngine.RectTransform
  14. ---@field public bg StoryTalkItem__Generate_talkRgt_bg
  15. ---@field public text StoryTalkItem__Generate_talkRgt_text
  16. ---@field public dsc StoryTalkItem__Generate_talkRgt_dsc
  17. ---@field public next UnityEngine.GameObject
  18. ---@class StoryTalkItem__Generate_talkLft_dsc
  19. ---@field public gameObject UnityEngine.GameObject
  20. ---@field public rectTransform UnityEngine.RectTransform
  21. ---@field public text UnityEngine.UI.Text
  22. ---@class StoryTalkItem__Generate_talkLft_text
  23. ---@field public gameObject UnityEngine.GameObject
  24. ---@field public text UnityEngine.UI.Text
  25. ---@class StoryTalkItem__Generate_talkLft_bg
  26. ---@field public gameObject UnityEngine.GameObject
  27. ---@field public image UnityEngine.UI.Image
  28. ---@class StoryTalkItem__Generate_talkLft
  29. ---@field public gameObject UnityEngine.GameObject
  30. ---@field public rectTransform UnityEngine.RectTransform
  31. ---@field public bg StoryTalkItem__Generate_talkLft_bg
  32. ---@field public text StoryTalkItem__Generate_talkLft_text
  33. ---@field public dsc StoryTalkItem__Generate_talkLft_dsc
  34. ---@field public next UnityEngine.GameObject
  35. ---@class StoryTalkItem__Generate
  36. ---@field private gameObject UnityEngine.GameObject
  37. ---@field private transform UnityEngine.Transform
  38. ---@field private rectTransform UnityEngine.RectTransform
  39. ---@field private layoutElement UnityEngine.UI.LayoutElement
  40. ---@field private canvasGroup UnityEngine.CanvasGroup
  41. ---@field private talkLft StoryTalkItem__Generate_talkLft
  42. ---@field private talkRgt StoryTalkItem__Generate_talkRgt
  43. local StoryTalkItemView = class("StoryTalkItemView")
  44. function StoryTalkItemView:ctor()
  45. end
  46. ---@private
  47. function StoryTalkItemView:SetActive(result)
  48. self.gameObject:SetActive(result)
  49. end
  50. ---@private
  51. function StoryTalkItemView:InitGenerate(Root, data)
  52. self.transform = Root
  53. self.inited = true
  54. local tmp
  55. self:InitGenerate__1(Root,data)
  56. self:InitGenerate__2(Root,data)
  57. self:InitGenerate__3(Root,data)
  58. self:InitGenerate__4(Root,data)
  59. self:InitGenerate__5(Root,data)
  60. self:InitGenerate__6(Root,data)
  61. self:InitGenerate__7(Root,data)
  62. self:InitGenerate__8(Root,data)
  63. self:InitGenerate__9(Root,data)
  64. self:InitGenerate__10(Root,data)
  65. self:InitGenerate__11(Root,data)
  66. end
  67. ---@private
  68. function StoryTalkItemView:InitGenerate__1(Root, data)
  69. --[[
  70. Root
  71. --]]
  72. self.rectTransform = Root:GetComponent(Enum.TypeInfo.RectTransform)
  73. self.layoutElement = Root:GetComponent(Enum.TypeInfo.LayoutElement)
  74. self.canvasGroup = Root:GetComponent(Enum.TypeInfo.CanvasGroup)
  75. end
  76. ---@private
  77. function StoryTalkItemView:InitGenerate__2(Root, data)
  78. --[[
  79. TalkLft
  80. --]]
  81. local tmp = Root:Find("TalkLft").gameObject
  82. if tolua.getpeer(tmp) == nil then
  83. tolua.setpeer(tmp, {})
  84. end
  85. self.talkLft = tmp
  86. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  87. end
  88. ---@private
  89. function StoryTalkItemView:InitGenerate__3(Root, data)
  90. --[[
  91. TalkLft/Name/bg
  92. --]]
  93. local tmp = Root:Find("TalkLft/Name/bg").gameObject
  94. if tolua.getpeer(tmp) == nil then
  95. tolua.setpeer(tmp, {})
  96. end
  97. self.talkLft.bg = tmp
  98. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  99. end
  100. ---@private
  101. function StoryTalkItemView:InitGenerate__4(Root, data)
  102. --[[
  103. TalkLft/Name/Text
  104. --]]
  105. local tmp = Root:Find("TalkLft/Name/Text").gameObject
  106. if tolua.getpeer(tmp) == nil then
  107. tolua.setpeer(tmp, {})
  108. end
  109. self.talkLft.text = tmp
  110. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  111. end
  112. ---@private
  113. function StoryTalkItemView:InitGenerate__5(Root, data)
  114. --[[
  115. TalkLft/Dsc
  116. --]]
  117. local tmp = Root:Find("TalkLft/Dsc").gameObject
  118. if tolua.getpeer(tmp) == nil then
  119. tolua.setpeer(tmp, {})
  120. end
  121. self.talkLft.dsc = tmp
  122. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  123. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  124. end
  125. ---@private
  126. function StoryTalkItemView:InitGenerate__6(Root, data)
  127. --[[
  128. TalkLft/Next
  129. --]]
  130. local tmp = Root:Find("TalkLft/Next").gameObject
  131. if tolua.getpeer(tmp) == nil then
  132. tolua.setpeer(tmp, {})
  133. end
  134. self.talkLft.next = tmp
  135. end
  136. ---@private
  137. function StoryTalkItemView:InitGenerate__7(Root, data)
  138. --[[
  139. TalkRgt
  140. --]]
  141. local tmp = Root:Find("TalkRgt").gameObject
  142. if tolua.getpeer(tmp) == nil then
  143. tolua.setpeer(tmp, {})
  144. end
  145. self.talkRgt = tmp
  146. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  147. end
  148. ---@private
  149. function StoryTalkItemView:InitGenerate__8(Root, data)
  150. --[[
  151. TalkRgt/Name/bg
  152. --]]
  153. local tmp = Root:Find("TalkRgt/Name/bg").gameObject
  154. if tolua.getpeer(tmp) == nil then
  155. tolua.setpeer(tmp, {})
  156. end
  157. self.talkRgt.bg = tmp
  158. tmp.image = tmp:GetComponent(Enum.TypeInfo.Image)
  159. end
  160. ---@private
  161. function StoryTalkItemView:InitGenerate__9(Root, data)
  162. --[[
  163. TalkRgt/Name/Text
  164. --]]
  165. local tmp = Root:Find("TalkRgt/Name/Text").gameObject
  166. if tolua.getpeer(tmp) == nil then
  167. tolua.setpeer(tmp, {})
  168. end
  169. self.talkRgt.text = tmp
  170. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  171. end
  172. ---@private
  173. function StoryTalkItemView:InitGenerate__10(Root, data)
  174. --[[
  175. TalkRgt/Dsc
  176. --]]
  177. local tmp = Root:Find("TalkRgt/Dsc").gameObject
  178. if tolua.getpeer(tmp) == nil then
  179. tolua.setpeer(tmp, {})
  180. end
  181. self.talkRgt.dsc = tmp
  182. tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
  183. tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
  184. end
  185. ---@private
  186. function StoryTalkItemView:InitGenerate__11(Root, data)
  187. --[[
  188. TalkRgt/Next
  189. --]]
  190. local tmp = Root:Find("TalkRgt/Next").gameObject
  191. if tolua.getpeer(tmp) == nil then
  192. tolua.setpeer(tmp, {})
  193. end
  194. self.talkRgt.next = tmp
  195. end
  196. ---@private
  197. function StoryTalkItemView:GenerateDestroy()
  198. if tolua.getpeer(self.talkRgt.next) ~= nil then
  199. tolua.setpeer(self.talkRgt.next, nil)
  200. end
  201. if tolua.getpeer(self.talkRgt.dsc) ~= nil then
  202. tolua.setpeer(self.talkRgt.dsc, nil)
  203. end
  204. if tolua.getpeer(self.talkRgt.text) ~= nil then
  205. tolua.setpeer(self.talkRgt.text, nil)
  206. end
  207. if tolua.getpeer(self.talkRgt.bg) ~= nil then
  208. tolua.setpeer(self.talkRgt.bg, nil)
  209. end
  210. if tolua.getpeer(self.talkLft.next) ~= nil then
  211. tolua.setpeer(self.talkLft.next, nil)
  212. end
  213. if tolua.getpeer(self.talkLft.dsc) ~= nil then
  214. tolua.setpeer(self.talkLft.dsc, nil)
  215. end
  216. if tolua.getpeer(self.talkLft.text) ~= nil then
  217. tolua.setpeer(self.talkLft.text, nil)
  218. end
  219. if tolua.getpeer(self.talkLft.bg) ~= nil then
  220. tolua.setpeer(self.talkLft.bg, nil)
  221. end
  222. if tolua.getpeer(self.talkLft) ~= nil then
  223. tolua.setpeer(self.talkLft, nil)
  224. end
  225. self.talkLft = nil
  226. if tolua.getpeer(self.talkRgt) ~= nil then
  227. tolua.setpeer(self.talkRgt, nil)
  228. end
  229. self.talkRgt = nil
  230. self.transform = nil
  231. self.gameObject = nil
  232. self.inited = false
  233. end
  234. return StoryTalkItemView