private void _InitBottom(GameObject go) { _btnBorrowMoney = go.GetComponentEx <Button> (Layout.btn_borrow); _btnAdvice = go.GetComponentEx <Button> (Layout.btn_advice); _btnPayBack = go.GetComponentEx <Button> (Layout.btn_packback); _btnGameSet = go.GetComponentEx <Button> (Layout.btn_settings); _lbPlayerName = go.GetComponentEx <Text> (Layout.lb_heroName); _lbPlayerAge = go.GetComponentEx <Text> (Layout.lb_heroAge); _lbCareer = go.GetComponentEx <Text> (Layout.lb_heroCareer); var headImg = go.GetComponentEx <RawImage> (Layout.img_heroHead); _rawHeadDisplay = new UIRawImageDisplay(headImg); _shadeEffectImg [0] = headImg; _offlineImgs [0] = go.GetComponentEx <Image> (Layout.img_imgOffline); for (var i = 0; i < _playerInfors.Length; i++) { var tmpImg = go.GetComponentEx <Image> (Layout.img_plaerHeadBg + (i + 1)); // tmpImg.SetActiveEx (true); var playerInfor = new UIBattlePlayerInforItem(tmpImg.gameObject); playerInfor.setActivEx(true); playerInfor.playerIndex = i + 1; _playerInfors[i] = playerInfor; _shadeEffectImg [i + 1] = playerInfor.GetPlayerHead(); _offlineImgs [i + 1] = playerInfor.GetImgOffline(); } btn_heroInfor = go.GetComponentEx <Button> (Layout.img_heroHeadBg); _showHideBtn = true; _tipRecordBoard = new UIBattleRecordBaord(go.GetComponentEx <Image>(Layout.img_tipRecordBoard).gameObject); // var letterImg = go.GetComponentEx<Image> (Layout.img_letter); // playerLetterImg = new UIImageDisplay (letterImg); img_roundimg = go.GetComponentEx <Image> (Layout.img_round); _imgLight1 = go.GetComponentEx <Image> (Layout.img_light1); _imgLight2 = go.GetComponentEx <Image> (Layout.img_light2); _imgLight3 = go.GetComponentEx <Image> (Layout.img_light3); _imgLight4 = go.GetComponentEx <Image> (Layout.img_light4); setLightImage(_imgLight1); img_chat1 = go.GetComponentEx <Image> (Layout.img_chat1); img_chat2 = go.GetComponentEx <Image> (Layout.img_chat2); img_chat3 = go.GetComponentEx <Image> (Layout.img_chat3); img_chat4 = go.GetComponentEx <Image> (Layout.img_chat4); img_chat1.SetActiveEx(false); img_chat2.SetActiveEx(false); img_chat3.SetActiveEx(false); img_chat4.SetActiveEx(false); }
private void _OnInitCenter(GameObject go) { var raw = go.GetComponentEx <RawImage> (Layout.raw_head); _headImg = new UIRawImageDisplay(raw); img_board = go.GetComponentEx <Image> (Layout.img_board); btn_heroInfor = go.GetComponentEx <Button> (Layout.btn_heroInfor); btn_target = go.GetComponentEx <Button> (Layout.btn_target); btn_balaceIncome = go.GetComponentEx <Button> (Layout.btn_balance); btn_debt = go.GetComponentEx <Button> (Layout.btn_debt); btn_sale = go.GetComponentEx <Button> (Layout.btn_sale); btn_checkout = go.GetComponentEx <Button> (Layout.btn_checkout); }
public UIBattlePlayerInforItem(GameObject go) { go.SetActiveEx(true); btn_head = go.GetComponentEx <Button> (go.name); lb_playerName = go.GetComponentEx <Text> (Layout.lb_name); lb_playerAge = go.GetComponentEx <Text> (Layout.lb_age); _roleHead = go.GetComponentEx <RawImage> (Layout.raw_HeadImg); raw_headDisplay = new UIRawImageDisplay(_roleHead); lb_totalMoney = go.GetComponentEx <Text> (Layout.lb_totalMoney); lb_quality = go.GetComponentEx <Text> (Layout.lb_quality); lb_time = go.GetComponentEx <Text> (Layout.lb_time); lb_career = go.GetComponentEx <Text>(Layout.lb_career); lb_nonIncome = go.GetComponentEx <Text> (Layout.lb_nonIncome); _incomeProgress = go.GetComponentEx <Image> (Layout.img_progressMoney + Layout.img_progressbar); _qualityProgress = go.GetComponentEx <Image> (Layout.img_progressQuality + Layout.img_progressbar); _timeProgress = go.GetComponentEx <Image> (Layout.img_progressTime + Layout.img_progressbar); // _qualityProgressBg = go.GetComponentEx<Image> (Layout.img_progressQuality); // _timeProgressBg = go.GetComponentEx<Image> (Layout.img_progressTime); // _timeProgressBg.SetActiveEx (false); // _qualityProgressBg.SetActiveEx (false); _incomeProgress.fillAmount = 0; _qualityProgress.fillAmount = 0; _timeProgress.fillAmount = 0; // var tmpLetter = go.GetComponentEx<Image> (Layout.img_letter); // _letterImg = new UIImageDisplay (tmpLetter); // img_round = go.GetComponentEx<Image> (Layout.img_npcRound); img_offline = go.GetComponentEx <Image> (Layout.img_offline); _selfGameObj = go; }