public override void Awake() { base.Awake(); if (mDMono.ObjectParamList != null) { if (mDMono.ObjectParamList.Count > 0) { _equipmentPresetController = (mDMono.ObjectParamList[0] as GameObject).GetMonoILRComponent <LTPartnerEquipmentPresetController>(); } if (mDMono.ObjectParamList.Count > 1) { _equipmentInfoController = (mDMono.ObjectParamList[1] as GameObject).GetMonoILRComponent <LTPartnerEquipmentInfoController>(); } } _button = mDMono.transform.GetComponent <UIButton>(); if (mDMono.gameObject.name.Equals("Add")) { _button.onClick.Add(new EventDelegate(OnClickAddButton)); } else { _button.onClick.Add(new EventDelegate(OnItemClicked)); } }
public override void Awake() { base.Awake(); instance = this; var t = mDMono.transform; _input = t.GetComponent <UIInput>("Lab_Title/Edit/Btn_Edit"); _input.onChange.Add(new EventDelegate(OnInputChange)); _equipmentPresetController = t.parent.FindEx("EquipmentPreset").GetMonoILRComponent <LTPartnerEquipmentPresetController>(); _arrowObj = t.FindEx("Arrow").gameObject; _editObj = t.FindEx("Lab_Title/Edit").gameObject; _editObj.SetActive(false); _equipSuitLeft = t.FindEx("EquipSuit_Left"); _tpEquipSuitRight = t.GetComponent <TweenPosition>("EquipSuit_Right"); _leftEquipSuitCells = new LTPartnerEquipSuitCellController[6]; _leftEquipSuitCells[0] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Left/Container/EquipmentIcon"); _leftEquipSuitCells[1] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Left/Container/EquipmentIcon (1)"); _leftEquipSuitCells[2] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Left/Container/EquipmentIcon (2)"); _leftEquipSuitCells[3] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Left/Container/EquipmentIcon (3)"); _leftEquipSuitCells[4] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Left/Container/EquipmentIcon (4)"); _leftEquipSuitCells[5] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Left/Container/EquipmentIcon (5)"); _rightEquipSuitCells = new LTPartnerEquipSuitCellController[6]; _rightEquipSuitCells[0] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Right/Container/EquipmentIcon"); _rightEquipSuitCells[1] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Right/Container/EquipmentIcon (1)"); _rightEquipSuitCells[2] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Right/Container/EquipmentIcon (2)"); _rightEquipSuitCells[3] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Right/Container/EquipmentIcon (3)"); _rightEquipSuitCells[4] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Right/Container/EquipmentIcon (4)"); _rightEquipSuitCells[5] = t.GetMonoILRComponent <LTPartnerEquipSuitCellController>("EquipSuit_Right/Container/EquipmentIcon (5)"); _equipInfoCells = new LTPartnerEquipInfoCell[6]; _equipInfoCells[0] = t.GetMonoILRComponent <LTPartnerEquipInfoCell>("Equip/item"); _equipInfoCells[1] = t.GetMonoILRComponent <LTPartnerEquipInfoCell>("Equip/item (1)"); _equipInfoCells[2] = t.GetMonoILRComponent <LTPartnerEquipInfoCell>("Equip/item (2)"); _equipInfoCells[3] = t.GetMonoILRComponent <LTPartnerEquipInfoCell>("Equip/item (3)"); _equipInfoCells[4] = t.GetMonoILRComponent <LTPartnerEquipInfoCell>("Equip/item (4)"); _equipInfoCells[5] = t.GetMonoILRComponent <LTPartnerEquipInfoCell>("Equip/item (5)"); _currentAttrValues = new UILabel[11]; _currentAttrValues[0] = t.GetComponent <UILabel>("Attr/Bg/Current"); _currentAttrValues[1] = t.GetComponent <UILabel>("Attr/Bg (1)/Current"); _currentAttrValues[2] = t.GetComponent <UILabel>("Attr/Bg (2)/Current"); _currentAttrValues[3] = t.GetComponent <UILabel>("Attr/Bg (3)/Current"); _currentAttrValues[4] = t.GetComponent <UILabel>("Attr/Bg (4)/Current"); _currentAttrValues[5] = t.GetComponent <UILabel>("Attr/Bg (5)/Current"); _currentAttrValues[6] = t.GetComponent <UILabel>("Attr/Bg (6)/Current"); _currentAttrValues[7] = t.GetComponent <UILabel>("Attr/Bg (7)/Current"); _currentAttrValues[8] = t.GetComponent <UILabel>("Attr/Bg (8)/Current"); _currentAttrValues[9] = t.GetComponent <UILabel>("Attr/Bg (9)/Current"); _currentAttrValues[10] = t.GetComponent <UILabel>("Attr/Bg (10)/Current"); _originAttrValues = new UILabel[11]; _originAttrValues[0] = t.GetComponent <UILabel>("Attr/Bg/Origin"); _originAttrValues[1] = t.GetComponent <UILabel>("Attr/Bg (1)/Origin"); _originAttrValues[2] = t.GetComponent <UILabel>("Attr/Bg (2)/Origin"); _originAttrValues[3] = t.GetComponent <UILabel>("Attr/Bg (3)/Origin"); _originAttrValues[4] = t.GetComponent <UILabel>("Attr/Bg (4)/Origin"); _originAttrValues[5] = t.GetComponent <UILabel>("Attr/Bg (5)/Origin"); _originAttrValues[6] = t.GetComponent <UILabel>("Attr/Bg (6)/Origin"); _originAttrValues[7] = t.GetComponent <UILabel>("Attr/Bg (7)/Origin"); _originAttrValues[8] = t.GetComponent <UILabel>("Attr/Bg (8)/Origin"); _originAttrValues[9] = t.GetComponent <UILabel>("Attr/Bg (9)/Origin"); _originAttrValues[10] = t.GetComponent <UILabel>("Attr/Bg (10)/Origin"); _oldAttrValues = new double[11]; _equppedAttrValues = new double[11]; _rightSuitFxTweeners = t.GetComponent <Transform>("EquipSuit_Right/Label").GetComponents <UITweener>(); isSuitTextShow = false; isSuitTypeShow = -1; isChangeColor = false; }