| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 | using System;using System.Collections;using FairyGUI;using UI.ClothingFoster;using UI.CommonGame;namespace GFGGame{    public class SuitFosterFinishView : BaseWindow    {        private UI_SuitFosterFinishUI _ui;        private int _suitId;        private int _index;        private SortedList _lastPropertyList;        private SortedList _curPropertyList;        public override void Dispose()        {            base.Dispose();        }        protected override void OnInit()        {            base.OnInit();            packageName = UI_SuitFosterFinishUI.PACKAGE_NAME;            _ui = UI_SuitFosterFinishUI.Create();            this.viewCom = _ui.target;            this.viewCom.Center();            this.modal = true;            // viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;            _ui.m_bg.onClick.Add(this.Hide);        }        protected override void OnShown()        {            base.OnShown();            _suitId = (int)(this.viewData as object[])[0];            _index = (int)(this.viewData as object[])[1];            _ui.m_grpRenew.visible = false;            _ui.m_bg.touchable = false;            _ui.m_img.fillAmount = 0;            _lastPropertyList = (this.viewData as object[])[2] as SortedList;            SuitFosterDataManager.Instance.GetPropertyData(_suitId, _index, out _curPropertyList, out SortedList _addPropertyList);            SuitFosterData data = SuitFosterDataManager.Instance.GetSuitFosterData(_suitId);            SuitFosterListCfg cfg = SuitFosterListCfgArray.Instance.GetCfg(_suitId);            int count = ConstDressUpScoreType.scoreTypeList().Count;            for (int i = 0; i < count; i++)            {                int score = i + 1;                UI_ListPropertyItem comPrpperty = UI_ListPropertyItem.Proxy(_ui.target.GetChild("comProperty" + i));                int property = (int)_lastPropertyList[score];                comPrpperty.m_txtProperty.text = StringUtil.GetColorText(property.ToString(), "#5B4A3B");                comPrpperty.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score));                UI_ListPropertyItem comAddPrpperty = UI_ListPropertyItem.Proxy(_ui.target.GetChild("comAddProperty" + i));                int addProperty = (int)_curPropertyList[score];                comAddPrpperty.m_txtProperty.text = StringUtil.GetColorText(addProperty.ToString(), addProperty == property ? "#5B4A3B" : "#FFDE9E");                comAddPrpperty.m_loaIcon.url = ResPathUtil.GetCommonGameResPath("kp_sx_" + (score));            }            _ui.m_grpProperty.visible = true;            _ui.m_t0.Play(() =>            {                int num = 0;                Timers.inst.Add(0.01f, 100, (param) =>                {                    num++;                    _ui.m_img.fillAmount += 0.1f;                    if (num == 10)                    {                        _ui.m_grpAddProperty.visible = true;                        _ui.m_t1.Play(() =>                        {                            _ui.m_grpRenew.visible = data.maintainStep >= cfg.renewOpenLv;                            _ui.m_bg.touchable = true;                        });                    }                });            });        }        protected override void OnHide()        {            base.OnHide();            _ui.m_img.fillAmount = 0;            _ui.m_grpRenew.visible = false;            _ui.m_grpProperty.visible = false;            _ui.m_grpAddProperty.visible = false;        }    }}
 |