源战役客户端
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1014 rindas
38 KiB

pirms 4 nedēļām
  1. require("game.proto.111.Require111")
  2. require("game.luaState.LuaState")
  3. require("game.cheat.CheatInputView")
  4. require("game.cheat.CheatModel")
  5. require("game.cheat.CheatCameraView")
  6. require("game.cheat.CheatUICameraView")
  7. require("game.cheat.CheatPropertyView")
  8. require("game.cheat.CheatAccelerationView")
  9. require("game.cheat.CheatBloomView")
  10. require("game.cheat.CheatFXAAView")
  11. require("game.cheat.CheatFreeCameraView")
  12. require("game.cheat.CheatGreenScreenClickView")
  13. require("game.cheat.CheatHideSelectRoleViewClickView")
  14. CheatController = CheatController or BaseClass(BaseController)
  15. CheatController.FUNC_BTNS = {
  16. [1] = {name = "战士"},
  17. [2] = {name = "女枪"},
  18. [3] = {name = "刺客"},
  19. [4] = {name = "主教"},
  20. [5] = {name = "伙伴"},
  21. [6] = {name = "特效"},
  22. [7] = {name = "技能"},
  23. [8] = {name = "切换场景"},
  24. [9] = {name = "游戏状态"},
  25. }
  26. CheatController.SKILL_RES = {
  27. [1] = "zs_effect",
  28. [3] = "ck_effect",
  29. [4] = "fs_effect",
  30. }
  31. SceneIdTest =
  32. {
  33. [0] = 1001,
  34. [1] = 1002,
  35. }
  36. --场景测试资源
  37. SceneTest =
  38. {
  39. ZhanShiRole = "101010100",
  40. NvQiangRole = "101040100",
  41. ChiKeRole = "101030100",
  42. ZhuJiaoRole = "101050100",
  43. HuoBanRole = "20300200",
  44. HuoBanRWeapon = "model_weapon_r_2030020",
  45. ZhanShiLWeapon = "model_weapon_l_102010100",
  46. ZhanShiRWeapon = "model_weapon_r_102010100",
  47. NvQiangLWeapon = "model_weapon_l_102040100",
  48. NvQiangRWeapon = "model_weapon_r_102040100",
  49. NvQiangBWeapon = "model_weapon_b_102040100",
  50. CiKeRWeapon = "model_weapon_r_102030100",
  51. CiKeLWeapon = "model_weapon_l_102030100",
  52. ZhuJiaoRWeapon = "model_weapon_r_102050100",
  53. }
  54. CheatController.ZHANSHI_BTNS = {
  55. [1] = {name = "带盾连击",action = {"attack","attack2","attack3","attack4","attack5"},dun = true},
  56. [2] = {name = "不带盾连击",action = {"attack6","attack7","attack8","attack20"}},
  57. [3] = {name = "冲撞不带盾",action = {"attack9","attack10","attack11"}},
  58. [4] = {name = "冲撞带盾",action = {"attack12","attack13","attack14"},dun = true},
  59. [5] = {name = "砸地",action = {"attack15"}},
  60. [6] = {name = "反刺盾",action = {"attack16"}},
  61. [7] = {name = "嘲讽",action = {"attack17"}},
  62. [8] = {name = "跳跃带盾",action = {"jump","jump2","jump3"},dun = true},
  63. [9] = {name = "跳跃不带盾",action = {"jump4","jump5","jump6"}},
  64. [10] = {name = "战斗待机带盾",action = {"idle"},dun = true},
  65. [11] = {name = "战斗待机没盾",action = {"idle2"}},
  66. [12] = {name = "休闲带盾",action = {"casual"},dun = true},
  67. [13] = {name = "跑带盾",action = {"run"},dun = true},
  68. [14] = {name = "跑不带盾",action = {"run2"}},
  69. [15] = {name = "受击带盾",action = {"hited"},dun = true},
  70. [16] = {name = "受击不带盾",action = {"hited2"}},
  71. [17] = {name = "走路带盾",action = {"walk"},dun = true},
  72. [18] = {name = "死亡带盾",action = {"death"},dun = true},
  73. [19] = {name = "死亡不带盾",action = {"death2"}},
  74. [20] = {name = "眩晕带盾",action = {"dizzy"},dun = true},
  75. [21] = {name = "眩晕不带盾",action = {"dizzy2"}},
  76. [22] = {name = "倒地带盾",action = {"down"},dun = true},
  77. [23] = {name = "倒地不带盾",action = {"down2"}},
  78. [24] = {name = "起身带盾",action = {"rise"},dun = true},
  79. [25] = {name = "起身不带盾",action = {"rise2"}},
  80. [26] = {name = "打坐不带盾",action = {"sit4","sit5","sit6"}},
  81. [27] = {name = "打坐带盾",action = {"sit","sit2","sit3"},dun = true},
  82. [28] = {name = "休闲不带盾",action = {"casual2"}},
  83. }
  84. CheatController.CHANGE_SCENE_BTNS = {
  85. [1] = {id = 1000,name = "小酒馆"},
  86. [2] = {id = 1001,name = "罗赛岛"},
  87. [3] = {id = 1002,name = "洛兰王国"},
  88. [4] = {id = 1003,name = "珊瑚树海"},
  89. [5] = {id = 1004,name = "暮雪平原"},
  90. }
  91. CheatController.ZHUJIAO_BTNS = {
  92. [1] = {name = "待机",action = {"idle"}},
  93. [2] = {name = "休闲",action = {"casual"}},
  94. [3] = {name = "",action = {"run"}},
  95. [4] = {name = "跳跃",action = {"jump","jump2","jump3"}},
  96. [5] = {name = "受击",action = {"hited"}},
  97. [16] = {name = "走路",action = {"walk"}},
  98. [6] = {name = "死亡",action = {"death"}},
  99. [7] = {name = "打坐",action = {"sit"},noweapon = true},
  100. [8] = {name = "眩晕",action = {"dizzy"}},
  101. [9] = {name = "倒地",action = {"down"}},
  102. [10] = {name = "起身",action = {"rise"}},
  103. [11] = {name = "连击",action = {"attack","attack2","attack3","attack4"}},
  104. [12] = {name = "治愈法阵",action = {"attack5"}},
  105. [13] = {name = "治愈",action = {"attack6"}},
  106. [14] = {name = "火球术",action = {"attack7"}},
  107. [15] = {name = "天堂审判",action = {"attack8"}},
  108. }
  109. CheatController.CHIKE_BTNS = {
  110. [1] = {name = "待机",action = {"idle"},weapon = true},
  111. [2] = {name = "休闲",action = {"casual"},weapon = true},
  112. [3] = {name = "",action = {"run"},weapon = true},
  113. [4] = {name = "跳跃",action = {"jump","jump2","jump3"},weapon = true},
  114. [5] = {name = "受击",action = {"hited"},weapon = true},
  115. [16] = {name = "走路",action = {"walk"}},
  116. [6] = {name = "死亡",action = {"death"},weapon = true},
  117. [7] = {name = "打坐",action = {"sit","sit2","sit3"}},
  118. [8] = {name = "眩晕",action = {"dizzy"},weapon = true},
  119. [9] = {name = "倒地",action = {"down"},weapon = true},
  120. [10] = {name = "起身",action = {"rise"},weapon = true},
  121. [11] = {name = "连击技能",action = {"attack","attack2","attack3","attack4","attack5","attack6"},weapon = true},
  122. [12] = {name = "隐身技能",action = {"attack7"},weapon = true},
  123. [13] = {name = "黑球缠绕技能",action = {"attack8"},weapon = true},
  124. [14] = {name = "分身技能",action = {"attack9","attack10","attack11"},weapon = true},
  125. [15] = {name = "飞镖",action = {"attack12"}},
  126. }
  127. CheatController.NVQIANG_BTNS = {
  128. [1] = {name = "待机",action = {"idle"}},
  129. [2] = {name = "",action = {"run"}},
  130. [3] = {name = "跳跃",action = {"jump","jump2","jump3"}},
  131. [4] = {name = "受击",action = {"hited"}},
  132. [5] = {name = "走路",action = {"walk"}},
  133. [6] = {name = "死亡",action = {"death"}},
  134. [7] = {name = "打坐",action = {"sit","sit2","sit3"}},
  135. [8] = {name = "眩晕",action = {"dizzy"}},
  136. [9] = {name = "倒地",action = {"down"}},
  137. [10] = {name = "起身",action = {"rise"}},
  138. [11] = {name = "连击",action = {"attack","attack2","attack3","attack4","attack5"},pao = true},
  139. [12] = {name = "朝天技能",action = {"attack6"},pao = true},
  140. [13] = {name = "连射技能",action = {"attack7"}},
  141. [14] = {name = "buff状态",action = {"attack8"}},
  142. [15] = {name = "击退",action = {"attack9"},pao = true},
  143. }
  144. CheatController.HUOBAN_BTNS = {
  145. [1] = {name = "待机",action = {"idle"}},
  146. [2] = {name = "",action = {"run"}},
  147. [3] = {name = "受击",action = {"hited"}},
  148. [4] = {name = "走路",action = {"walk"}},
  149. [5] = {name = "死亡",action = {"death"}},
  150. [6] = {name = "眩晕",action = {"dizzy"}},
  151. [7] = {name = "倒地",action = {"down"}},
  152. [8] = {name = "起身",action = {"rise"}},
  153. [9] = {name = "攻击",action = {"attack"}},
  154. }
  155. CheatController.SKILL_BTNS = {
  156. [1] = {
  157. [1] = {name = "冲撞不带盾",action = {"attack9","attack10","attack11"},effect = {1}},
  158. [2] = {name = "冲撞带盾",action = {"attack12","attack13","attack14"},effect = {2},dun = true},
  159. [3] = {name = "带盾连击",action = {"attack","attack2","attack3","attack4","attack5"},single_effect = true,effect = {{9},{10},{},{11},{12}},lweffect = {},dun = true},--lweffect 13
  160. [4] = {name = "不带盾连击",action = {"attack6","attack7","attack8","attack20"},single_effect = true,effect = {{14,15},{16},{17,18}}},
  161. [5] = {name = "砸地",action = {"attack15"},effect = {4,6},rweffect = {5}},
  162. [6] = {name = "不带盾砸地",action = {"attack18"},effect = {4,3,6}},
  163. [7] = {name = "反刺盾",action = {"attack16"},effect = {7}},
  164. [8] = {name = "嘲讽",action = {"attack17"},effect = {8}},
  165. },
  166. [3] = {
  167. [1] = {name = "连击技能",action = {"attack","attack2","attack3","attack4","attack5","attack6"},single_effect = true,effect = {{28},{29},{30,27},{31},{32}}},
  168. [2] = {name = "隐身技能",action = {"attack7"},effect = {19}},
  169. [3] = {name = "黑球缠绕技能",action = {"attack8"},effect = {20,21,22}},
  170. [4] = {name = "分身技能",action = {"attack9","attack10","attack11"},effect = {23,24}},
  171. [5] = {name = "飞镖",action = {"attack12"},effect = {25}},--26
  172. },
  173. [4] = {
  174. [1] = {name = "连击",action = {"attack","attack2","attack3","attack4"},single_effect = true,effect = {{47,49},{50},{50},{46,48,52}}},
  175. [2] = {name = "治愈法阵",action = {"attack5"},single_effect = true,effect = {{36,37}}},
  176. [3] = {name = "治愈",action = {"attack6"},single_effect = true,effect = {{38,39}}},
  177. [4] = {name = "火球术",action = {"attack7"},single_effect = true,effect = {{40,42}}},
  178. [5] = {name = "天堂审判",action = {"attack8"},single_effect = true,effect = {{43,44,45}}},
  179. }
  180. }
  181. CheatController.PARTICLE_RES =
  182. {
  183. [1] = "zs_effect_skill_jineng1_chongji_1",
  184. [2] = "zs_effect_skill_jineng1_chongji_2",
  185. [3] = "zs_effect_skill_jineng2_chentu",
  186. [4] = "zs_effect_skill_jineng2_daoguang",
  187. [5] = "zs_effect_skill_jineng2_xuanzhuanjian",
  188. [6] = "zs_effect_skill_jineng2_zadibaozha",
  189. [7] = "zs_effect_skill_jineng3_fanshang",
  190. [8] = "zs_effect_skill_jineng4_chaofeng",
  191. [9] = "zs_effect_skill_pugong1_daoguang1",
  192. [10] = "zs_effect_skill_pugong1_daoguang2",
  193. [11] = "zs_effect_skill_pugong1_daoguang3",
  194. [12] = "zs_effect_skill_pugong1_dunpaiguang",
  195. [13] = "zs_effect_skill_pugong1_xuanzhuandun",
  196. [14] = "zs_effect_skill_pugong2_chentu",
  197. [15] = "zs_effect_skill_pugong2_daoguang1",
  198. [16] = "zs_effect_skill_pugong2_daoguang2",
  199. [17] = "zs_effect_skill_pugong2_daoguang3",
  200. [18] = "zs_effect_skill_pugong2_zadibaozha",
  201. [19] = "ck_effect_skill_jineng1_buff",
  202. [20] = "ck_effect_skill_jineng2_buff1",
  203. [21] = "ck_effect_skill_jineng2_buff2",
  204. [22] = "ck_effect_skill_jineng2_fly_qiu",
  205. [23] = "ck_effect_skill_jineng3_gongjixian",
  206. [24] = "ck_effect_skill_jineng3_quanquan",
  207. [25] = "ck_effect_skill_jineng4_buff",
  208. [26] = "ck_effect_skill_jineng4_feibiao",
  209. [27] = "ck_effect_skill_pugong1_chentu",
  210. [28] = "ck_effect_skill_pugong1_daoguang1",
  211. [29] = "ck_effect_skill_pugong1_daoguang2",
  212. [30] = "ck_effect_skill_pugong1_daoguang3",
  213. [31] = "ck_effect_skill_pugong1_daoguang4",
  214. [32] = "ck_effect_skill_pugong1_daoguang5",
  215. [33] = "ck_effect_skill_shouji1",
  216. [34] = "ck_effect_skill_shouji2",
  217. [35] = "ck_effect_skill_shouji3",
  218. [36] = "fs_effect_skill_jineng1_buff",
  219. [37] = "fs_effect_skill_jineng1_fazhen1",
  220. [38] = "fs_effect_skill_jineng2_jiaxue",
  221. [39] = "fs_effect_skill_jineng2_shengguang",
  222. [40] = "fs_effect_skill_jineng3_guangqiu",
  223. [41] = "fs_effect_skill_jineng3_quanquan",
  224. [42] = "fs_effect_skill_jineng3_shoujiguang",
  225. [43] = "fs_effect_skill_jineng4_buff",
  226. [44] = "fs_effect_skill_jineng4_dimianquan",
  227. [45] = "fs_effect_skill_jineng4_shandian",
  228. [46] = "fs_effect_skill_pugong_chentu",
  229. [47] = "fs_effect_skill_pugong_dandao1",
  230. [48] = "fs_effect_skill_pugong_dandao2",
  231. [49] = "fs_effect_skill_pugong_shoujiguang1",
  232. [50] = "fs_effect_skill_pugong_shoujiguang2",
  233. [51] = "fs_effect_skill_pugong_shoujiguang3",
  234. [52] = "fs_effect_skill_pugong_shoujiguang4",
  235. [53] = "fs_effect_skill_shoujiguang",
  236. }
  237. CheatController.PARTICLE_BTNS = {
  238. [1] = {
  239. [1] = {name = "jn1_chongji_1",ps = 1},
  240. [2] = {name = "jn1_chongji_2",ps = 2},
  241. [3] = {name = "jn2_chentu",ps = 3},
  242. [4] = {name = "jn2_daoguang",ps = 4},
  243. [5] = {name = "jn2_xuanzhuanjian",ps = 5},
  244. [6] = {name = "jn2_zadibaozha",ps = 6},
  245. [7] = {name = "jn3_fanshang",ps = 7},
  246. [8] = {name = "jn4_chaofeng",ps = 8},
  247. [9] = {name = "pg1_daoguang1",ps = 9},
  248. [10] = {name = "pg1_daoguang2",ps = 10},
  249. [11] = {name = "pg1_daoguang3",ps = 11},
  250. [12] = {name = "pg1_dunpaiguang",ps = 12},
  251. [13] = {name = "pg1_xuanzhuandun",ps = 13},
  252. [14] = {name = "pg2_chentu",ps = 14},
  253. [15] = {name = "pg2_daoguang1",ps = 15},
  254. [16] = {name = "pg2_daoguang2",ps = 16},
  255. [17] = {name = "pg2_daoguang3",ps = 17},
  256. [18] = {name = "pg2_zadibaozha",ps = 18},
  257. },
  258. [3] = {
  259. [1] = {name = "jineng1_buff",ps = 19},
  260. [2] = {name = "jineng2_buff1",ps = 20},
  261. [3] = {name = "jineng2_buff2",ps = 21},
  262. [4] = {name = "jineng2_fly_qiu",ps = 22},
  263. [5] = {name = "jineng3_gongjixian",ps = 23},
  264. [6] = {name = "jineng3_quanquan",ps = 24},
  265. [7] = {name = "jineng4_buff",ps = 25},
  266. [8] = {name = "jineng4_feibiao",ps = 26},
  267. [9] = {name = "pugong1_chentu",ps = 27},
  268. [10] = {name = "pugong1_daoguang1",ps =28},
  269. [11] = {name = "pugong1_daoguang2",ps = 29},
  270. [12] = {name = "pugong1_daoguang3",ps = 30},
  271. [13] = {name = "pugong1_daoguang4",ps = 31},
  272. [14] = {name = "pugong1_daoguang5",ps = 32},
  273. [15] = {name = "shouji1",ps = 33},
  274. [16] = {name = "shouji2",ps = 34},
  275. [17] = {name = "shouji3",ps = 35},
  276. },
  277. [4] = {
  278. [1] = {name = "jineng1_buff",ps = 36},
  279. [2] = {name = "jineng1_fazhen1",ps = 37},
  280. [3] = {name = "jineng2_jiaxue",ps = 38},
  281. [4] = {name = "jineng2_shengguang",ps = 39},
  282. [5] = {name = "jineng3_guangqiu",ps = 40},
  283. [6] = {name = "jineng3_quanquan",ps = 41},
  284. [7] = {name = "jineng3_shoujiguang",ps = 42},
  285. [8] = {name = "jineng4_buff",ps = 43},
  286. [9] = {name = "jineng4_dimianquan",ps = 44},
  287. [10] = {name = "jineng4_shandian",ps = 45},
  288. [11] = {name = "pugong_chentu",ps = 46},
  289. [12] = {name = "pugong_dandao1",ps = 47},
  290. [13] = {name = "pugong_dandao2",ps = 48},
  291. [14] = {name = "pugong_shoujiguang1",ps = 49},
  292. [15] = {name = "pugong_shoujiguang2",ps = 50},
  293. [16] = {name = "pugong_shoujiguang3",ps = 51},
  294. [17] = {name = "pugong_shoujiguang4",ps = 52},
  295. [18] = {name = "shoujiguang",ps = 53},
  296. }
  297. }
  298. CheatController.ShowView = {
  299. -- ["show_view_1"] = {command = "show_view_1",command_name = "打开副本",args_list = {},openModel = "BaseDungeonModel", openEvent = BaseDungeonModel.OPEN_HALL_VIEW,parm = {}},
  300. -- ["show_view_2"] = {command = "show_view_2",command_name = "打开神殿",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_GUILD_GOVERN_VIEW,parm = {true}},
  301. -- ["show_view_3"] = {command = "show_view_3",command_name = "打开世界服",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_WORLD_VIEW,parm = {}},
  302. -- ["show_view_4"] = {command = "show_view_4",command_name = "打开VIP",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_VIP_VIEW,parm = {1}},
  303. -- ["show_view_5"] = {command = "show_view_5",command_name = "打开首冲",args_list = {},openModel = "RechargeActivityModel", openEvent = RechargeActivityModel.OPEN_FIRST_RECHARGE_VIEW,parm = {}},
  304. -- ["show_view_6"] = {command = "show_view_6",command_name = "打开寻宝",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_TREASUREHUNT_VIEW,parm = {}},
  305. -- -- ["show_view_7"] = {command = "show_view_7",command_name = "打开祈愿",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_PRAY_VIEW,parm = {}},
  306. -- ["show_view_8"] = {command = "show_view_8",command_name = "打开婚姻",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_MARRIAGE_VIEW,parm = {}},
  307. -- ["show_view_9"] = {command = "show_view_9",command_name = "打开幻兽",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_BEAST_VIEW,parm = {}},
  308. -- ["show_view_10"] = {command = "show_view_10",command_name = "打开星图",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_STAR_MAP_VIEW,parm = {}},
  309. -- ["show_view_11"] = {command = "show_view_11",command_name = "打开角色",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_MAIN_ROLE_VIEW,parm = {}},
  310. -- ["show_view_12"] = {command = "show_view_12",command_name = "打开魂珠",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_RUNE_BASE_VIEW,parm = {}},
  311. -- ["show_view_14"] = {command = "show_view_14",command_name = "打开神器",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_ARTIFACT_VIEW,parm = {}},
  312. -- ["show_view_15"] = {command = "show_view_15",command_name = "打开精灵",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_PET_VIEW,parm = {1}},
  313. -- ["show_view_16"] = {command = "show_view_16",command_name = "荣耀战神",args_list = {},openModel = "GlobalEventSystem", openEvent = EventName.OPEN_HONOUR_VIEW,parm = {true}},
  314. }
  315. function CheatController:__init()
  316. CheatController.Instance = self
  317. self.btn_list = {}
  318. self.child_btn_list = {}
  319. self.is_pop = false
  320. self.model_index = 1
  321. self.model = CheatModel:getInstance()
  322. self:RegisterAllProtocals()
  323. self:InitView()
  324. self:InitEvent()
  325. self.scene_index = 0
  326. end
  327. --[[
  328. * socket
  329. *
  330. ]]
  331. function CheatController:RegisterAllProtocals()
  332. self:RegisterProtocal(11100, "handler11100")--秘籍列表
  333. self:RegisterProtocal(11101, "handler11101")--执行秘籍
  334. self:RegisterProtocal(11105, "handler11105")--后台触发客户端信息
  335. end
  336. function CheatController:InitView()
  337. local function onClickMainBtn()
  338. self.is_pop = not self.is_pop
  339. if IsTableEmpty(self.btn_list) then
  340. self:CreateBtns()
  341. end
  342. if self.is_pop then
  343. local len = #self.btn_list
  344. local item = nil
  345. for i = 1,len do
  346. item = self.btn_list[i]
  347. item:SetActive(true)
  348. end
  349. else
  350. local len = #self.btn_list
  351. local item = nil
  352. for i = 1,len do
  353. item = self.btn_list[i]
  354. item:SetActive(false)
  355. end
  356. len = #self.child_btn_list
  357. for i = 1,len do
  358. item = self.child_btn_list[i]
  359. item:SetActive(false)
  360. end
  361. end
  362. end
  363. GlobalEventSystem:Bind(EventName.SHOW_CHEAT,onClickMainBtn)
  364. local function onOpenLuaStateView()
  365. if self.LuaState == nil then
  366. self.LuaState = LuaState.New()
  367. end
  368. if self.LuaState:HasOpen() then
  369. self.LuaState:Close()
  370. else
  371. self.LuaState:Open()
  372. end
  373. end
  374. if ClientConfig.plat_name == "mrzj_develop" then
  375. -- onOpenLuaStateView()
  376. end
  377. GlobalEventSystem:Bind(EventName.OPEN_LUA_STATE_VIEW,onOpenLuaStateView)
  378. end
  379. function CheatController:CreateBtns()
  380. local function onClickBtnHandler(target)
  381. for i,v in ipairs(self.child_btn_list) do
  382. panelMgr:DestroyGameObject(v)
  383. end
  384. self.child_btn_list = {}
  385. if self.last_index then
  386. self.btn_list[self.last_index].transform:GetComponent("Image").color = Color(0.208, 1, 0.451, 1)
  387. end
  388. Scene.Instance:GetMainRole():SetType(SceneBaseType.MainRole)
  389. local change_btn_state = true
  390. local index = tonumber(target.name)
  391. if index == 1 then
  392. self:TestZhanShi(index)
  393. elseif index == 2 then
  394. self:TestNvQiang(index)
  395. elseif index == 6 then
  396. local func = function(target)
  397. self:TestEffect(target)
  398. end
  399. local ps_btn = CheatController.PARTICLE_BTNS[self.model_index]
  400. if ps_btn then
  401. self:TestFunc(ps_btn,func)
  402. end
  403. elseif index == 7 then
  404. local func = function(target)
  405. self:TestSkill(target)
  406. end
  407. local skill_btn = CheatController.SKILL_BTNS[self.model_index]
  408. if skill_btn then
  409. self:TestFunc(skill_btn,func)
  410. end
  411. elseif index == 8 then
  412. local func = function(target)
  413. local index = tonumber(target.name)
  414. local scene_info = CheatController.CHANGE_SCENE_BTNS[index]
  415. if scene_info.id ~= SceneManager.Instance:GetSceneId() then
  416. GlobalEventSystem:Fire(SceneEventType.REQUEST_CHANGE_SCENE, scene_info.id)
  417. end
  418. end
  419. self:TestFunc(CheatController.CHANGE_SCENE_BTNS,func)
  420. elseif index == 9 then
  421. if self.LuaState == nil then
  422. self.LuaState = LuaState.New()
  423. end
  424. if self.LuaState:HasOpen() then
  425. self.LuaState:Close()
  426. else
  427. self.LuaState:Open()
  428. end
  429. elseif index == 3 then
  430. self:TestChiKe(index)
  431. elseif index == 4 then
  432. self:TestZhuJiao(index)
  433. elseif index == 5 then
  434. Scene.Instance:GetMainRole():SetType(SceneBaseType.Partner)
  435. self:TestHuoBan(index)
  436. end
  437. self.last_index = index
  438. if change_btn_state then
  439. self.btn_list[index].transform:GetComponent("Image").color = Color(0.208, 0.31, 0.451, 1)
  440. end
  441. end
  442. local len = 0--#CheatController.FUNC_BTNS
  443. local vo = nil
  444. local btn = nil
  445. for i = 1,len do
  446. vo = CheatController.FUNC_BTNS[i]
  447. btn = UiFactory.createChild(panelMgr:GetParent("Top"),UIType.SmallButton1,i)
  448. btn.transform.localPosition = Vector3((i - 1) * 150 - ScreenWidth/3 - 100,ScreenHeight - 400,0)
  449. btn.transform:Find("Text"):GetComponent("Text").text = vo.name
  450. btn.transform:GetComponent("Image").color = Color(0.208, 1, 0.451, 1)
  451. AddClickEvent(btn,onClickBtnHandler)
  452. table.insert(self.btn_list,btn)
  453. end
  454. end
  455. function CheatController:TestFunc(data,callback)
  456. local vo = nil
  457. local btn = nil
  458. local len = #data
  459. for i=1,len do
  460. local addx = 0
  461. local addy = 0
  462. local add = (i - 0.001)/13
  463. if add > 1 then
  464. addy = addy + 650*math.floor(add)
  465. addx = math.floor(add) * 180
  466. end
  467. local x = - ScreenWidth/2 + 100 + addx
  468. local y = ScreenHeight - (i - 1) * 50 - 450 + addy
  469. vo = data[i]
  470. btn = UiFactory.createChild(panelMgr:GetParent("Top"),UIType.SmallButton2,i)
  471. btn.transform.localPosition = Vector3(x,y,0)
  472. btn.transform:Find("Text"):GetComponent("Text").text = vo.name
  473. AddClickEvent(btn,callback)
  474. table.insert(self.child_btn_list,btn)
  475. end
  476. local _play_action = function()
  477. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  478. end
  479. GlobalTimerQuest:AddDelayQuest(_play_action,0.0001)
  480. end
  481. function CheatController:TestSkill(target)
  482. local index = tonumber(target.name)
  483. local skill_info = CheatController.SKILL_BTNS[self.model_index][index]
  484. self:PlayAction(skill_info)
  485. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  486. if self.model_index == 1 then
  487. if skill_info.dun then
  488. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.ZhanShiLWeapon,AttachNode.LHand,Vector3(0,0,180))
  489. end
  490. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.ZhanShiRWeapon,AttachNode.RHand)
  491. elseif self.model_index == 3 then
  492. end
  493. if not skill_info.single_effect then
  494. if skill_info.effect then
  495. for index,particle_index in pairs(skill_info.effect) do
  496. local func = function()
  497. end
  498. local function call_back_func()
  499. end
  500. ParticleManager:getInstance():AddTargetEffect( CheatController.PARTICLE_RES[particle_index], Scene.Instance:GetMainRole().compress_id, false, nil, nil, nil,call_back_func,nil,1)
  501. end
  502. end
  503. local func = function()
  504. end
  505. if skill_info.lweffect then
  506. for index,particle_index in pairs(skill_info.lweffect) do
  507. Scene.Instance:GetMainRole():AttachWeaponParticle(CheatController.PARTICLE_RES[particle_index],AttachNode.LHand,func,CheatController.SKILL_RES[self.model_index])
  508. end
  509. end
  510. if skill_info.rweffect then
  511. for index,particle_index in pairs(skill_info.rweffect) do
  512. Scene.Instance:GetMainRole():AttachWeaponParticle(CheatController.PARTICLE_RES[particle_index],AttachNode.RHand,func,CheatController.SKILL_RES[self.model_index])
  513. end
  514. end
  515. end
  516. end
  517. function CheatController:TestEffect(target)
  518. local index = tonumber(target.name)
  519. local effect_info = CheatController.PARTICLE_BTNS[self.model_index][index]
  520. local func = function( obj )
  521. self.effect_obj = obj
  522. end
  523. ParticleManager:getInstance():AddTargetEffect( CheatController.PARTICLE_RES[effect_info.ps], Scene.Instance:GetMainRole().compress_id)
  524. end
  525. function CheatController:TestHuoBan(index)
  526. if self.model_index ~= 5 then
  527. Scene.Instance:GetMainRole():UpdateModel(SceneTest.HuoBanRole)
  528. end
  529. self.model_index = index
  530. local func = function(target)
  531. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  532. local index = tonumber(target.name)
  533. local action_info = CheatController.HUOBAN_BTNS[index]
  534. self:PlayAction(action_info)
  535. if action_info.weapon then
  536. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.HuoBanRWeapon,AttachNode.RHand)
  537. end
  538. end
  539. self:TestFunc(CheatController.HUOBAN_BTNS,func)
  540. end
  541. function CheatController:TestZhuJiao(index)
  542. if self.model_index ~= 4 then
  543. Scene.Instance:GetMainRole():UpdateModel(SceneTest.ZhuJiaoRole)
  544. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.ZhuJiaoRWeapon,AttachNode.RHand)
  545. Scene.Instance:SetCurTestRole(SceneTest.ZhuJiaoRole)
  546. end
  547. self.model_index = index
  548. local func = function(target)
  549. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  550. local index = tonumber(target.name)
  551. local action_info = CheatController.ZHUJIAO_BTNS[index]
  552. self:PlayAction(action_info)
  553. if not action_info.noweapon then
  554. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.ZhuJiaoRWeapon,AttachNode.RHand)
  555. end
  556. end
  557. self:TestFunc(CheatController.ZHUJIAO_BTNS,func)
  558. end
  559. function CheatController:TestChiKe(index)
  560. if self.model_index ~= 3 then
  561. Scene.Instance:GetMainRole():UpdateModel(SceneTest.ChiKeRole)
  562. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.CiKeRWeapon,AttachNode.RHand)
  563. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.CiKeLWeapon,AttachNode.LHand)
  564. Scene.Instance:SetCurTestRole(SceneTest.ChiKeRole)
  565. end
  566. self.model_index = index
  567. local func = function(target)
  568. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  569. local index = tonumber(target.name)
  570. local action_info = CheatController.CHIKE_BTNS[index]
  571. self:PlayAction(action_info)
  572. if action_info.weapon then
  573. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.CiKeRWeapon,AttachNode.RHand)
  574. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.CiKeLWeapon,AttachNode.LHand)
  575. end
  576. end
  577. self:TestFunc(CheatController.CHIKE_BTNS,func)
  578. end
  579. function CheatController:TestZhanShi(index)
  580. if self.model_index ~= 1 then
  581. Scene.Instance:SetCurTestRole(SceneTest.ZhanShiRole)
  582. Scene.Instance:GetMainRole():UpdateModel(SceneTest.ZhanShiRole)
  583. end
  584. self.model_index = index
  585. local func = function(target)
  586. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  587. local index = tonumber(target.name)
  588. local action_info = CheatController.ZHANSHI_BTNS[index]
  589. self:PlayAction(action_info)
  590. if action_info.dun then
  591. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.ZhanShiLWeapon,AttachNode.LHand)
  592. end
  593. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.ZhanShiRWeapon,AttachNode.RHand)
  594. end
  595. self:TestFunc(CheatController.ZHANSHI_BTNS,func)
  596. end
  597. function CheatController:TestNvQiang(index)
  598. local add_def_weapon = function()
  599. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.NvQiangLWeapon,AttachNode.LHand)
  600. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.NvQiangRWeapon,AttachNode.RHand)
  601. end
  602. if self.model_index ~= 2 then
  603. Scene.Instance:SetCurTestRole(SceneTest.NvQiangRole)
  604. Scene.Instance:GetMainRole():UpdateModel(SceneTest.NvQiangRole)
  605. end
  606. self.model_index = index
  607. local func = function(target)
  608. Scene.Instance:GetMainRole():RemoveAttackAllWeapon()
  609. local index = tonumber(target.name)
  610. local action_info = CheatController.NVQIANG_BTNS[index]
  611. self:PlayAction(action_info)
  612. if action_info.pao then
  613. Scene.Instance:GetMainRole():AttackWeapon(SceneTest.NvQiangBWeapon,AttachNode.BHand)
  614. end
  615. add_def_weapon()
  616. end
  617. self:TestFunc(CheatController.NVQIANG_BTNS,func)
  618. end
  619. function CheatController:PlayAction(action_info)
  620. local to_idle = function()
  621. Scene.Instance:GetMainRole():PlayAction("idle")
  622. end
  623. local play_action
  624. local action_index = 1
  625. play_action = function()
  626. Scene.Instance:GetMainRole():PlayAction(action_info.action[action_index])
  627. if action_info.single_effect then
  628. local effets = action_info.effect[action_index]
  629. if effets and #effets > 0 then
  630. local call_back_func = function()
  631. end
  632. for i,particle_index in ipairs(effets) do
  633. ParticleManager:getInstance():AddTargetEffect(CheatController.PARTICLE_RES[particle_index], Scene.Instance:GetMainRole().compress_id, false, nil, nil, nil,call_back_func,nil,1)
  634. end
  635. end
  636. end
  637. local _play_action = function()
  638. local last_time = Scene.Instance:GetMainRole():GetCurActionTime()
  639. if #action_info.action > action_index then
  640. action_index = action_index + 1
  641. GlobalTimerQuest:AddDelayQuest(play_action,last_time)
  642. else
  643. GlobalTimerQuest:AddDelayQuest(to_idle,last_time)
  644. end
  645. end
  646. GlobalTimerQuest:AddDelayQuest(_play_action,0.001)
  647. end
  648. play_action()
  649. end
  650. function CheatController:InitEvent()
  651. local game_start = function ()
  652. self:SendFmtToGame(11100)
  653. end
  654. GlobalEventSystem:Bind(EventName.GAME_START, game_start)
  655. GlobalEventSystem:Bind(EventName.REQUEST_MIJI_DATA, game_start)
  656. local open_input_view = function ()
  657. if not PlatformMgr:getInstance():IsInternalPalt() then
  658. Message.show("no Internal Palt")
  659. return
  660. end
  661. -- self.model:SetCheatsData()
  662. if self.cheatInputView == nil then
  663. self.cheatInputView = CheatInputView.New()
  664. end
  665. if self.cheatInputView:HasOpen() then
  666. self.cheatInputView:Close()
  667. else
  668. self.cheatInputView:Open()
  669. end
  670. end
  671. GlobalEventSystem:Bind(EventName.OPEN_CHEAT_INPUT_VIEW, open_input_view)
  672. local open_client_view = function ()
  673. end
  674. GlobalEventSystem:Bind(EventName.OPEN_CHEAT_CLIENT_VIEW, open_client_view)
  675. local send_cheat = function(text)
  676. if text then
  677. self:SendFmtToGame(11101, "s", text)
  678. end
  679. end
  680. self.model:Bind(CheatModel.SEND_CHEAT_TO_SERVER, send_cheat)
  681. local open_show_view = function (key)
  682. local cfg = CheatController.ShowView[key]
  683. if not cfg then
  684. return
  685. end
  686. --兼容用Model发事件的同学
  687. if string.find(cfg.openModel,"Model",-5,true) then
  688. local instance = _G[cfg.openModel].Instance
  689. instance._class_type.Fire(instance,cfg.openEvent,unpack(cfg.parm))
  690. else
  691. _G[cfg.openModel]:Fire(cfg.openEvent,unpack(cfg.parm))
  692. end
  693. end
  694. self.model:Bind(CheatModel.OPEN_CHEAT_SHOW_VIEW, open_show_view)
  695. local function on_camera_view( )
  696. if not self.camera_edit_view then
  697. self.camera_edit_view = CheatCameraView.New()
  698. end
  699. self.camera_edit_view:Open()
  700. end
  701. self.model:Bind(CheatModel.OPEN_CAMERA_EDIt_VIEW, on_camera_view)
  702. local function on_ui_camera_view( )
  703. if not self.ui_camera_edit_view then
  704. self.ui_camera_edit_view = CheatUICameraView.New()
  705. end
  706. self.ui_camera_edit_view:Open()
  707. end
  708. self.model:Bind(CheatModel.OPEN_UI_CAMERA_EDIT_VIEW, on_ui_camera_view)
  709. local function on_bloom_view( )
  710. if not self.bloom_edit_view then
  711. self.bloom_edit_view = CheatBloomView.New()
  712. end
  713. self.bloom_edit_view:Open()
  714. end
  715. self.model:Bind(CheatModel.OPEN_BLOOM_EDIt_VIEW, on_bloom_view)
  716. local function on_property_view( )
  717. if not self.property_view then
  718. self.property_view = CheatPropertyView.New()
  719. end
  720. self.property_view:Open()
  721. end
  722. self.model:Bind(CheatModel.OPEN_CLIENT_PROPERTY_VIEW, on_property_view)
  723. local function on_acceleration_view( )
  724. if not self.acceleration_view then
  725. self.acceleration_view = CheatAccelerationView.New()
  726. end
  727. self.acceleration_view:Open()
  728. end
  729. self.model:Bind(CheatModel.OPEN_CLIENT_ACCELERATION_VIEW, on_acceleration_view)
  730. local function QuickRunCode( code_str )
  731. if not code_str then return end
  732. -- 范例local str = "@RunCode:local a = BossModel:GetInstance().world_boss_status; Message.show(a)"
  733. code_str = string.gsub(code_str,"@RunCode:","")
  734. code_str = string.gsub(code_str,"RunCode:","")
  735. if pcall(loadstring(code_str)) then
  736. print('执行成功')
  737. else
  738. print('执行失败')
  739. end
  740. end
  741. self.model:Bind(CheatModel.Quick_Run_Code, QuickRunCode)
  742. local function open_fxaa_test_view(show)
  743. self:OpenView("CheatFXAAView", show)
  744. end
  745. self.model:Bind(CheatModel.OPEN_FXAA_TEST_VIEW, open_fxaa_test_view)
  746. local function open_free_camera_view(show)
  747. self:OpenView("CheatFreeCameraView", show)
  748. end
  749. self.model:Bind(CheatModel.OPEN_FREE_CAMERA_VIEW, open_free_camera_view)
  750. local function open_green_screen_click_view(show, green_click_size)
  751. if show then
  752. if not self.CheatGreenScreenClickView then
  753. self.CheatGreenScreenClickView = CheatGreenScreenClickView.New()
  754. end
  755. if not self.CheatGreenScreenClickView:HasOpen() then
  756. self.CheatGreenScreenClickView:Open(green_click_size)
  757. else
  758. self.CheatGreenScreenClickView:ReOpen(green_click_size)
  759. end
  760. else
  761. if self.CheatGreenScreenClickView then
  762. self.CheatGreenScreenClickView:Close()
  763. end
  764. end
  765. -- self:OpenView("CheatGreenScreenClickView", show, green_click_size)
  766. end
  767. self.model:Bind(CheatModel.OPEN_GREEN_SCREEN_CLICK_VIEW, open_green_screen_click_view)
  768. local function open_selectRoleView_show_click_view(show, click_callback)
  769. self:OpenView("CheatHideSelectRoleViewClickView", show, click_callback)
  770. end
  771. self.model:Bind(CheatModel.OPEN_SELECTROLEVIEW_SHOW_CLICK_VIEW, open_selectRoleView_show_click_view)
  772. end
  773. function CheatController:handler11100()
  774. local vo = SCMD11100.New(true)
  775. if not IsTableEmpty(vo.command_list) then
  776. PlatformMgr.is_internal_palt = true
  777. end
  778. local data = {command = "pt_61001_[1002]", command_name = "切1002", args_list = {}}
  779. table.insert(vo.command_list, 1, data)
  780. data = {command = "perform", command_name = "perform", args_list = {}}
  781. table.insert(vo.command_list, 1, data)
  782. data = {command = "framecount_50", command_name = "设置帧数", args_list = {}}
  783. table.insert(vo.command_list, 2, data)
  784. data = {command = "auto_upgrade", command_name = "自动提升", args_list = {}}
  785. table.insert(vo.command_list, 3, data)
  786. data = {command = "open_story_id_index_0", command_name = "打开剧情", args_list = {}}
  787. table.insert(vo.command_list, 4, data)
  788. data = {command = "search_goods_物品名字", command_name = "查询物品ID", args_list = {}}
  789. table.insert(vo.command_list, 1, data)
  790. data = {command = "camera_edit", command_name = "摄像机参数", args_list = {}}
  791. table.insert(vo.command_list, data)
  792. data = {command = "Position", command_name = "Position", args_list = {}}
  793. table.insert(vo.command_list, 1, data)
  794. data = {command = "client_property", command_name = "属性预览", args_list = {}}
  795. table.insert(vo.command_list, 1, data)
  796. -- data = {command = "client_gyro", command_name = "gyro测试", args_list = {}}
  797. -- table.insert(vo.command_list, 1, data)
  798. data = {command = "open_fun_10030", command_name = "功能开放测试", args_list = {}}
  799. table.insert(vo.command_list, 1, data)
  800. data = {command = "RunCode:", command_name = "代码执行", args_list = {}}
  801. table.insert(vo.command_list, 1, data)
  802. data = {command = "TVB_100", command_name = "跑马弹幕测试", args_list = {}}
  803. table.insert(vo.command_list, 1, data)
  804. data = {command = "change_bloom", command_name = "摄像机泛光参数", args_list = {}}
  805. table.insert(vo.command_list, 1, data)
  806. data = {command = "ui_camera_edit", command_name = "摄像机UI模型参数", args_list = {}}
  807. table.insert(vo.command_list, 1, data)
  808. data = {command = "ban_auto_connect", command_name = "禁止自动重连", args_list = {}}
  809. table.insert(vo.command_list, data)
  810. data = {command = "use_model_render", command_name = "模型UI挂载", args_list = {}}
  811. table.insert(vo.command_list, data)
  812. data = {command = "fxaa_edit", command_name = "FXAA调试", args_list = {}}
  813. table.insert(vo.command_list, data)
  814. data = {command = "free_camera", command_name = "全自由相机", args_list = {}}
  815. table.insert(vo.command_list, data)
  816. data = {command = "enablegs", command_name = "启用绿屏", args_list = {}}
  817. table.insert(vo.command_list, data)
  818. data = {command = "hide_ui", command_name = "隐藏主界面", args_list = {}}
  819. table.insert(vo.command_list, data)
  820. data = {command = "show_ui", command_name = "显示主界面", args_list = {}}
  821. table.insert(vo.command_list, data)
  822. data = {command = "jipsaw", command_name = "拼图游戏", args_list = {}}
  823. table.insert(vo.command_list, data)
  824. data = {command = "play_story_", command_name = "播放剧情", args_list = {}}
  825. table.insert(vo.command_list, data)
  826. data = {command = "guaguale", command_name = "刮刮乐", args_list = {}}
  827. table.insert(vo.command_list, data)
  828. for index,data in pairs(CheatController.ShowView) do
  829. table.insert(vo.command_list,#vo.command_list + 1,data)
  830. end
  831. data = {command = "load_base_scene", command_name = "加载基础场景", args_list = {}}
  832. table.insert(vo.command_list, data)
  833. self.model:SetCheatsData(vo)
  834. end
  835. function CheatController:handler11101()
  836. end
  837. function CheatController:handler11105()
  838. local scmd = SCMD11105.New(true)
  839. local str = string.format("当前主界面隐藏情况 %d",lua_viewM.main_cancas_last_visible and 1 or 2)
  840. str = str .. "\n"
  841. local view_path = "root/Canvas/"
  842. local go = GameObject.Find(view_path)
  843. str = str..string.format("root/Canvas active情况 %d,position.x = %s,position.y = %s,,position.z = %s",go.activeSelf and 1 or 2,go.transform.localPosition.x,go.transform.localPosition.y,go.transform.localPosition.z)
  844. str = str .. "\n"
  845. local node = panelMgr:GetParent("UI")
  846. str = str..string.format("UI_ROOT active情况 %d,anchoredPosition.x = %s,anchoredPosition.y = %s,position.x = %s,position.y = %s,,position.z = %s",node.gameObject.activeSelf and 1 or 2,node.anchoredPosition.x,node.anchoredPosition.y,node.localPosition.x,node.localPosition.y,node.localPosition.z)
  847. str = str .. "\n"
  848. for i = 0, node.childCount-1 do
  849. local child = node:GetChild(i).gameObject
  850. str = str ..string.format("UI 子节点 name = %s,隐藏情况 = %d,anchoredPosition.x = %s,anchoredPosition.y = %s,position.x = %s,position.y = %s,,position.z = %s",child.name,child.activeSelf and 1 or 2,
  851. child.transform.anchoredPosition.x,child.transform.anchoredPosition.y,child.transform.localPosition.x,child.transform.localPosition.y,child.transform.localPosition.z)
  852. str = str .. "\n"
  853. end
  854. local node = panelMgr:GetParent("Activity")
  855. str = str..string.format("Activity_ROOT active情况 %d,anchoredPosition.x = %s,anchoredPosition.y = %s,position.x = %s,position.y = %s,,position.z = %s",node.gameObject.activeSelf and 1 or 2,node.anchoredPosition.x,node.anchoredPosition.y,node.localPosition.x,node.localPosition.y,node.localPosition.z)
  856. str = str .. "\n"
  857. for i = 0, node.childCount-1 do
  858. local child = node:GetChild(i).gameObject
  859. str = str ..string.format("Activity 子节点 name = %s,隐藏情况 = %d,anchoredPosition.x = %s,anchoredPosition.y = %s,position.x = %s,position.y = %s,,position.z = %s",child.name,child.activeSelf and 1 or 2,
  860. child.transform.anchoredPosition.x,child.transform.anchoredPosition.y,child.transform.localPosition.x,child.transform.localPosition.y,child.transform.localPosition.z)
  861. str = str .. "\n"
  862. end
  863. local node = panelMgr:GetParent("Top")
  864. str = str..string.format("Top_ROOT active情况 %d,anchoredPosition.x = %s,anchoredPosition.y = %s,position.x = %s,position.y = %s,,position.z = %s",node.gameObject.activeSelf and 1 or 2,node.anchoredPosition.x,node.anchoredPosition.y,node.localPosition.x,node.localPosition.y,node.localPosition.z)
  865. str = str .. "\n"
  866. for i = 0, node.childCount-1 do
  867. local child = node:GetChild(i).gameObject
  868. if not string.find(child.name,"miniMessage") then
  869. str = str ..string.format("Top 子节点 name = %s,隐藏情况 = %d,anchoredPosition.x = %s,anchoredPosition.y = %s,position.x = %s,position.y = %s,,position.z = %s",child.name,child.activeSelf and 1 or 2,
  870. child.transform.anchoredPosition.x,child.transform.anchoredPosition.y,child.transform.localPosition.x,child.transform.localPosition.y,child.transform.localPosition.z)
  871. str = str .. "\n"
  872. end
  873. end
  874. str = str .. string.format("main_canvas_hideView_list = \n")
  875. for view,_ in pairs(lua_viewM.main_canvas_hideView_list) do
  876. str = str .. view.layout_file .. "\n"
  877. end
  878. print("str = ",str)
  879. GameError.Instance:SendErrorToPHP("当前界面隐藏情况 = "..str)
  880. end