UICustom.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using UnityGameFramework.Runtime;
  6. using GameFramework;
  7. using GameFramework.DataTable;
  8. using GameFramework.Sound;
  9. using GameFramework.Download;
  10. using GameFramework.FileSystem;
  11. using GameFramework.ObjectPool;
  12. using GameFramework.Resource;
  13. using System;
  14. using DG.Tweening;
  15. namespace MetaClient
  16. {
  17. public class UICustom : UGuiForm
  18. {
  19. // Start is called before the first frame update
  20. [Header("初始界面")]
  21. public GameObject toolView;
  22. [Header("基础按钮界面")]
  23. public GameObject baseView;
  24. [Header("保存按钮")]
  25. public GameObject saveBtn;
  26. [Header("捏脸界面")]
  27. public GameObject nieLianView;
  28. [Header("身体界面")]
  29. public GameObject bodyView;
  30. [Header("自定义")]
  31. public GameObject ziDingYiBtn;
  32. [Header("衣服界面")]
  33. public GameObject clothView;
  34. [Header("左边界面")]
  35. public GameObject leftView;
  36. [Header("右边界面")]
  37. public GameObject rightView;
  38. //[Header("点击后生成的按钮列表")]
  39. //public GameObject buttonList;
  40. [Header("白底背景")]
  41. public GameObject whitebg;
  42. [Header("按钮预制体")]
  43. public GameObject buttonItem;
  44. [Header("滑块")]
  45. public Scrollbar scrollbar;
  46. [Header("颜色选择界面")]
  47. public GameObject colorView;
  48. // [Header("顺序")]
  49. private EButtonShunXu eButtonShunXu = EButtonShunXu.None;
  50. [Header("颜色演示预制体")]
  51. public GameObject colItem;
  52. public float tween_leftMax = 0;
  53. public float tween_leftMin = -250;
  54. public float tween_rightMin = 0;
  55. public float tween_rightMax = 223;
  56. private float tween_saveBtnMax = 119;
  57. private float tween_saveBtnMin = -108;
  58. //private float tweenTime = 10;
  59. //private float tweenLeastTime = 0;
  60. public bool isTween = false;
  61. [Header("选择界面分支")]
  62. [SerializeField]
  63. private ECustomStyple eCustomStyple = ECustomStyple.None;
  64. [Header("历史记录用于回退")]
  65. [SerializeField]
  66. private List<string> histroy;
  67. //用来判断是否是例如颜色框 调色板等额外的弹窗;
  68. private bool histroyextra;
  69. private int part = 0;
  70. //[Header("接受到的数据")]
  71. //[SerializeField]
  72. private IDataTable<DRCustomBody> _bodydata;
  73. protected override void OnOpen(object userData)
  74. {
  75. base.OnOpen(userData);
  76. IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  77. _bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  78. }
  79. protected override void OnClose(bool isShutdown, object userData)
  80. {
  81. base.OnClose(isShutdown, userData);
  82. }
  83. public void ClickBotton(ECustomStyple eCustomStyple,int id,bool ziDingYi)
  84. {
  85. if (isTween)
  86. {
  87. return;
  88. }
  89. isTween = true;
  90. leftView.transform.DOLocalMoveX(tween_leftMin, 2f).SetEase(Ease.InOutBack).OnComplete(()=> {
  91. //whitebg.SetActive(bg);
  92. ClickBtnFun(eCustomStyple,id,ziDingYi);
  93. leftView.transform.DOLocalMoveX(0, 2f).SetEase(Ease.InOutBack).OnComplete(() => {
  94. isTween = false;
  95. Debug.Log("222");
  96. });
  97. });
  98. Debug.Log("333");
  99. rightView.transform.DOLocalMoveX(tween_rightMax, 2f).SetEase(Ease.InOutBack).OnComplete(() => {
  100. rightView.transform.DOLocalMoveX(0, 2f).SetEase(Ease.InOutBack).OnComplete(() => {
  101. });
  102. });
  103. }
  104. /// <summary>
  105. /// 设置是否已在缓动
  106. /// </summary>
  107. public void SetTween(bool _bo) {
  108. isTween = _bo;
  109. }
  110. /// <summary>
  111. /// 获取是否缓动
  112. /// </summary>
  113. public bool GetTween()
  114. {
  115. return isTween;
  116. }
  117. public void HistoryAdd(string _str) {
  118. histroy.Add(_str);
  119. }
  120. /// <summary>
  121. /// 滑块改变
  122. /// </summary>
  123. public void ScrollValueChange()
  124. {
  125. Debug.Log(scrollbar.value);
  126. }
  127. public void BackBtnFun()
  128. {
  129. if (histroyextra)
  130. {
  131. BackExtraFun();
  132. histroyextra = false;
  133. return;
  134. }
  135. switch (this.histroy.Count)
  136. {
  137. case 0:
  138. Debug.Log("返回上一层");
  139. break;
  140. case 1:
  141. Debug.Log("返回选择捏脸/身体/服装");
  142. histroy.RemoveAt(histroy.Count - 1);
  143. Back_OneFun();
  144. break;
  145. case 2:
  146. Debug.Log("进入选择界面");
  147. histroy.RemoveAt(histroy.Count - 1);
  148. Back_TwoFun(true);
  149. break;
  150. default:
  151. Debug.Log("进入自定义或颜色");
  152. // histroy.RemoveAt(histroy.Count - 1);
  153. Back_ThreeFun();
  154. histroy.RemoveAt(histroy.Count - 1);
  155. break;
  156. }
  157. }
  158. void Back_OneFun() {
  159. ViewSetFalse();
  160. toolView.SetActive(true);
  161. //toolView.SetActive(true);
  162. //bodyView.SetActive(false);
  163. //nieLianView.SetActive(false);
  164. //clothView.SetActive(false);
  165. }
  166. void BackExtraFun()
  167. {
  168. rightView.SetActive(true);
  169. scrollbar.gameObject.SetActive(false);
  170. }
  171. void ViewSetFalse()
  172. {
  173. toolView.SetActive(false);
  174. bodyView.SetActive(false);
  175. nieLianView.SetActive(false);
  176. clothView.SetActive(false);
  177. }
  178. void BackView_Extra(GameObject _obj,bool _bo) {
  179. ViewSetFalse();
  180. _obj.SetActive(_bo);
  181. ViewSetChildTrue(_obj,_bo);
  182. }
  183. void ViewSetChildTrue(GameObject _obj,bool _bo)
  184. {
  185. _obj.transform.GetChild(0).gameObject.SetActive(_bo);
  186. _obj.transform.GetChild(0).gameObject.SetActive(_bo);
  187. _obj.transform.GetChild(2).gameObject.SetActive(!_bo);
  188. }
  189. void Back_TwoFun(bool _bo)
  190. {
  191. // int _choose = int.Parse(histroy[1]);
  192. // switch ((ECustomStyple)_choose)
  193. switch(eCustomStyple)
  194. {
  195. case ECustomStyple.Body:
  196. BackView_Extra(bodyView,_bo);
  197. break;
  198. case ECustomStyple.Cloth:
  199. BackView_Extra(clothView, _bo);
  200. break;
  201. case ECustomStyple.None:
  202. break;
  203. case ECustomStyple.NieLian:
  204. BackView_Extra(nieLianView, _bo);
  205. break;
  206. }
  207. //toolView.SetActive(true);
  208. //bodyView.SetActive(false);
  209. //nieLianView.SetActive(false);
  210. //clothView.SetActive(false);
  211. }
  212. void Back_ThreeFun()
  213. {
  214. string[] _strArrary = histroy[histroy.Count - 1].Split(',');
  215. if (_strArrary[0] == "Color")
  216. {
  217. colorView.SetActive(false);
  218. rightView.SetActive(true);
  219. }
  220. else if (_strArrary[0] == "ziDingyi")
  221. {
  222. int _chooseId = int.Parse(_strArrary[1]);
  223. ClickBtnFun(eCustomStyple, _chooseId, false);
  224. }
  225. else
  226. {
  227. Debug.Log("缺少当前情况需要添加>>>>");
  228. }
  229. //toolView.SetActive(true);
  230. //bodyView.SetActive(false);
  231. //nieLianView.SetActive(false);
  232. //clothView.SetActive(false);
  233. }
  234. /// <summary>
  235. /// 修改滑块
  236. /// </summary>
  237. public void SetValue(int _part,ECustomStyple eCustomStyple)
  238. {
  239. //scrollbar.value = _value;
  240. part = _part;
  241. }
  242. /// <summary>
  243. /// 获得滑块值
  244. /// </summary>
  245. public float GetValue()
  246. {
  247. return scrollbar.value;
  248. }
  249. /// <summary>
  250. /// 按钮点击事件
  251. /// </summary>
  252. public void ClickBtnFun(ECustomStyple eCustomStyple,int id,bool zidingyi) {
  253. //if (isTween)
  254. //{
  255. // return;
  256. //}
  257. whitebg.SetActive(true);
  258. scrollbar.gameObject.SetActive(false);
  259. this.eCustomStyple = eCustomStyple;
  260. //ECustomStyple _eCustomStyple = (ECustomStyple)int.Parse(_objects[0].ToString());
  261. switch (eCustomStyple)
  262. {
  263. case ECustomStyple.None:
  264. break;
  265. case ECustomStyple.NieLian:
  266. GameObject _nieLianList = nieLianView.transform.GetChild(0).gameObject;
  267. _nieLianList.SetActive(false);
  268. GameObject _nieLianXX = nieLianView.transform.GetChild(2).gameObject;
  269. _nieLianXX.SetActive(true);
  270. //if (!zidingyi)
  271. //{
  272. // ZiDingYiNeiLian(eCustomStyple, id, _nieLianXX.transform.GetChild(0).gameObject);
  273. // return;
  274. //}
  275. CreateNieLianImg(id, zidingyi);
  276. break;
  277. case ECustomStyple.Body:
  278. GameObject _bodyList = bodyView.transform.GetChild(0).gameObject;
  279. _bodyList.SetActive(false);
  280. GameObject _bodyListXX =bodyView.transform.GetChild(2).gameObject;
  281. _bodyListXX.SetActive(true);
  282. //if (!zidingyi)
  283. //{
  284. // ZiDingYiBody(eCustomStyple, id, _bodyListXX.transform.GetChild(0).gameObject);
  285. // return;
  286. //}
  287. CreateBodyImg(id, zidingyi);
  288. break;
  289. case ECustomStyple.Cloth:
  290. GameObject _clothList = clothView.transform.GetChild(0).gameObject;
  291. _clothList.SetActive(false);
  292. GameObject _clothListXX = clothView.transform.GetChild(2).gameObject;
  293. _clothListXX.SetActive(true);
  294. //if (!zidingyi)
  295. //{
  296. // ZiDingYiCloth(eCustomStyple, id, _clothListXX.transform.GetChild(0).gameObject);
  297. // return;
  298. //}
  299. CreateClothImg(id, zidingyi);
  300. break;
  301. }
  302. }
  303. //public Action ActionFun() {
  304. // return null;
  305. //}
  306. private void RemoveAllChildren(GameObject parent)
  307. {
  308. Transform transform;
  309. for (int i = 0; i < parent.transform.childCount; i++)
  310. {
  311. transform = parent.transform.GetChild(i);
  312. GameObject.Destroy(transform.gameObject);
  313. }
  314. }
  315. //public void ZiDingYiNeiLian(ECustomStyple eCustomStyple, int id,GameObject _objPar) {
  316. // RemoveAllChildren(bodyView.transform.GetChild(2).GetChild(0).gameObject);
  317. // GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  318. // _obj.transform.SetParent(_objPar.transform);
  319. // UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  320. // _uICustomBtn.id = id;
  321. // _uICustomBtn.eCustomStyple = eCustomStyple;
  322. // _obj.SetActive(true);
  323. //}
  324. //public void ZiDingYiBody(ECustomStyple eCustomStyple, int id, GameObject _objPar)
  325. //{
  326. // RemoveAllChildren(bodyView.transform.GetChild(2).GetChild(0).gameObject);
  327. // GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  328. // _obj.transform.SetParent(_objPar.transform);
  329. // UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  330. // _uICustomBtn.id = id;
  331. // _uICustomBtn.eCustomStyple = eCustomStyple;
  332. // _obj.SetActive(true);
  333. //}
  334. //public void ZiDingYiCloth(ECustomStyple eCustomStyple, int id, GameObject _objPar)
  335. //{
  336. // RemoveAllChildren(bodyView.transform.GetChild(2).GetChild(0).gameObject);
  337. // GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  338. // _obj.transform.SetParent(_objPar.transform);
  339. // UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  340. // _uICustomBtn.id = id;
  341. // _uICustomBtn.eCustomStyple = eCustomStyple;
  342. // _obj.SetActive(true);
  343. //}
  344. public void CreateNieLianImg(int parentid, bool ziDingYi)
  345. {
  346. GameObject _objPar = bodyView.transform.GetChild(2).GetChild(0).gameObject;
  347. RemoveAllChildren(_objPar);
  348. //等有捏脸表时改为捏脸
  349. IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  350. _bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  351. int cengji = ziDingYi ?1:0;
  352. if (!ziDingYi)
  353. {
  354. CreateZDYFun(parentid, _objPar);
  355. //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  356. //_obj.transform.SetParent(_objPar.transform);
  357. //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  358. //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
  359. //_uICustomBtn.id =parentid;
  360. //_uICustomBtn.eCustomStyple = eCustomStyple;
  361. //_obj.SetActive(true);
  362. }
  363. DRCustomBody[] dRCustomBodies = _bodydata.GetAllDataRows();
  364. for (int i = 0; i < dRCustomBodies.Length; i++)
  365. {
  366. Debug.Log(dRCustomBodies[i].Id);
  367. if (dRCustomBodies[i].ParentStyple == parentid&&dRCustomBodies[i].Cengji==cengji)
  368. {
  369. CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
  370. }
  371. }
  372. // ChangeListBotton(_objPar);
  373. }
  374. public void CreateClothImg(int parentid,bool ziDingYi)
  375. {
  376. GameObject _objPar = bodyView.transform.GetChild(2).GetChild(0).gameObject;
  377. RemoveAllChildren(_objPar);
  378. //等有服装时改为服装
  379. IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  380. _bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  381. int cengji = ziDingYi ?1:0;
  382. if (!ziDingYi)
  383. {
  384. CreateZDYFun(parentid, _objPar);
  385. //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  386. //_obj.transform.SetParent(_objPar.transform);
  387. //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  388. //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
  389. //_uICustomBtn.id = parentid;
  390. //_uICustomBtn.eCustomStyple = eCustomStyple;
  391. //_obj.SetActive(true);
  392. }
  393. DRCustomBody[] dRCustomBodies = _bodydata.GetAllDataRows();
  394. for (int i = 0; i < dRCustomBodies.Length; i++)
  395. {
  396. Debug.Log(dRCustomBodies[i].Id);
  397. if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
  398. {
  399. CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
  400. }
  401. }
  402. // ChangeListBotton(_objPar);
  403. }
  404. private void CreateZDYFun(int parentid,GameObject _objPar)
  405. {
  406. GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  407. _obj.transform.SetParent(_objPar.transform);
  408. UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  409. ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
  410. }
  411. public void ChangeUICustom(UICustomBtn uICustomBtn,int id, ECustomStyple eCustomStyple)
  412. {
  413. uICustomBtn.id = id;
  414. uICustomBtn.eCustomStyple = eCustomStyple;
  415. uICustomBtn.gameObject.SetActive(true);
  416. }
  417. public void CreateBodyImg(int parentid,bool ziDingYi) {
  418. GameObject _objPar = bodyView.transform.GetChild(2).GetChild(0).gameObject;
  419. RemoveAllChildren(_objPar);
  420. IDataTable<DRCustomBody> _data = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  421. _bodydata = GameEntry.DataTable.GetDataTable<DRCustomBody>();
  422. int cengji = ziDingYi ?1:0;
  423. if (!ziDingYi)
  424. {
  425. CreateZDYFun(parentid, _objPar);
  426. //GameObject _obj = GameObject.Instantiate(ziDingYiBtn);
  427. //_obj.transform.SetParent(_objPar.transform);
  428. //UICustomBtn _uICustomBtn = _obj.GetComponent<UICustomBtn>();
  429. //ChangeUICustom(_uICustomBtn, parentid, eCustomStyple);
  430. //_uICustomBtn.id = parentid;
  431. //_uICustomBtn.eCustomStyple = eCustomStyple;
  432. //_obj.SetActive(true);
  433. }
  434. DRCustomBody[] dRCustomBodies = _bodydata.GetAllDataRows();
  435. for (int i = 0; i < dRCustomBodies.Length; i++)
  436. {
  437. Debug.Log(dRCustomBodies[i].Id);
  438. if (dRCustomBodies[i].ParentStyple == parentid && dRCustomBodies[i].Cengji == cengji)
  439. {
  440. CreateButtonFun(dRCustomBodies[i].Icon, dRCustomBodies[i].Part, dRCustomBodies[i].Name, _objPar, dRCustomBodies[i].Id, dRCustomBodies[i].ButtonStyple, ECustomStyple.Body);
  441. }
  442. }
  443. // ChangeListBotton(_objPar);
  444. }
  445. /// <summary>
  446. /// 改变列表长短
  447. /// </summary>
  448. public void ChangeListBotton(GameObject _obj) {
  449. //Debug.Log("改变列表"+ _obj.transform.childCount+"");
  450. float _x = _obj.GetComponent<RectTransform>().offsetMin.x;
  451. int _childNum = _obj.transform.childCount;
  452. float _y = _childNum > 8 ? -240 * (_childNum - 8) : 0;
  453. _obj.GetComponent<RectTransform>().offsetMin = new Vector2(_x, _y);
  454. }
  455. //private IEnumerator Tween(Action _action) {
  456. // for (int i = 0; i < 100; i++)
  457. // {
  458. // float _value = i / 100;
  459. // float _right=Mathf.Lerp(tween_rightMax, tween_rightMin, _value);
  460. // float _left= Mathf.Lerp(tween_leftMix, tween_rightMax, _value);
  461. // clothView.GetComponent<RectTransform>().SetPositionX(_right);
  462. // toolView.GetComponent<RectTransform>().SetPositionX(_right);
  463. // bodyView.GetComponent<RectTransform>().SetPositionX(_right);
  464. // nieLianView.GetComponent<RectTransform>().SetPositionX(_right);
  465. // baseView.GetComponent<RectTransform>().SetPositionX(_left);
  466. // }
  467. // yield return null;
  468. //}
  469. protected override void OnUpdate(float elapseSeconds, float realElapseSeconds)
  470. {
  471. base.OnUpdate(elapseSeconds, realElapseSeconds);
  472. }
  473. //private void CreateNieLianFun(object[] _objects) {
  474. // ENieLianStyple _eNieLianStyple = (ENieLianStyple)int.Parse(_objects[1].ToString());
  475. // switch (_eNieLianStyple)
  476. // {
  477. // case ENieLianStyple.faxing:
  478. // break;
  479. // case ENieLianStyple.lianxing:
  480. // break;
  481. // case ENieLianStyple.yankuang:
  482. // break;
  483. // case ENieLianStyple.tongkong:
  484. // break;
  485. // case ENieLianStyple.meimao:
  486. // break;
  487. // case ENieLianStyple.bizi:
  488. // break;
  489. // case ENieLianStyple.erduo:
  490. // break;
  491. // case ENieLianStyple.zuiba:
  492. // break;
  493. // case ENieLianStyple.fuse:
  494. // break;
  495. // }
  496. // //switch()
  497. //}
  498. private void CreateButtonFun(string path,int _part,string _name, GameObject _parent,int _id,int buttonstyple,ECustomStyple eCustomStyple) {
  499. //Debug.Log(path);
  500. // Debug.Log(_parent);
  501. path = "CustomRole/" + path;
  502. GameEntry.Resource.LoadAsset(AssetUtility.GetUISpriteAsset(path), new LoadAssetCallbacks(
  503. (assetName, asset, duration, userData) =>
  504. {
  505. // Debug.Log(path);
  506. // Debug.Log(_parent);
  507. Texture2D tex = (Texture2D)asset;
  508. var sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.zero);
  509. GameObject _obj = GameObject.Instantiate(buttonItem);
  510. Image _objImg = _obj.transform.GetComponent<Image>();
  511. _obj.SetActive(true);
  512. _objImg.sprite = sprite;
  513. _obj.name = part+"";
  514. _obj.transform.SetParent(_parent.transform);
  515. UICustomBtn uICustomBtn = _obj.GetComponent<UICustomBtn>();
  516. uICustomBtn.id = _id;
  517. uICustomBtn.eButtonStyple = (EButtonStyple)buttonstyple;
  518. uICustomBtn.eCustomStyple = eCustomStyple;
  519. uICustomBtn.isCreate = false;
  520. uICustomBtn.part = _part;
  521. //GameObject
  522. //img.sprite = sprite;
  523. //if (nativeSize)
  524. //{
  525. // img.SetNativeSize();
  526. //}
  527. ChangeListBotton(_parent);
  528. }));
  529. }
  530. //public void NieLian() {
  531. //}
  532. public void ClickFaceChangeBtn()
  533. {
  534. GameEntry.Event.Fire(this, CustomRoleFaceEventArgs.Create(EditableFacePart.eye, new Vector3(1, 0, 0)));
  535. }
  536. }
  537. public enum ECustomStyple
  538. {
  539. None,
  540. NieLian,
  541. Body,
  542. Cloth
  543. }
  544. public enum EButtonStyple
  545. {
  546. Button,
  547. Scroll,
  548. TiaoSe,
  549. NorButton,
  550. Back
  551. }
  552. public enum ENieLianStyple {
  553. None,
  554. faxing,
  555. lianxing,
  556. yankuang,
  557. tongkong,
  558. meimao,
  559. bizi,
  560. erduo,
  561. zuiba,
  562. fuse
  563. }
  564. public enum EButtonShunXu {
  565. None,
  566. First,
  567. Second,
  568. Third
  569. }
  570. }