private void Init() { //牌的间隔 m_CardPointX = -40f; go_StakesSum = transform.Find("StakesSum").gameObject; go_Coin = transform.Find("Coin").gameObject; txt_CoinCout = go_Coin.transform.Find("txt_CoinCount").GetComponent <Text>(); txt_UserName = transform.Find("txt_UserName").GetComponent <Text>(); img_HeadIcon = transform.Find("img_HeadIcon").GetComponent <Image>(); img_Banker = transform.Find("img_HeadIcon/img_Banker").GetComponent <Image>(); txt_StakesSum = transform.Find("StakesSum/txt_StakesSum").GetComponent <Text>(); go_CountDown = transform.Find("CountDown").gameObject; txt_CountDown = transform.Find("CountDown/txt_CountDown").GetComponent <Text>(); txt_Hint = transform.Find("txt_Hint").GetComponent <Text>(); cardPoints = transform.Find("CardPoints"); m_StakesCountHint = transform.Find("StakesCountHint").GetComponent <StakesCountHint>(); txt_StakesSum.text = "0"; img_Banker.gameObject.SetActive(false); go_CountDown.SetActive(false); txt_Hint.gameObject.SetActive(false); txt_UserName.gameObject.SetActive(false); img_HeadIcon.gameObject.SetActive(false); go_StakesSum.SetActive(false); go_Coin.SetActive(false); }
private void Init() { go_LookCardHint = transform.Find("LookCardHint").gameObject; go_StakesSum = transform.Find("StakesSum").gameObject; go_Coin = transform.Find("Coin").gameObject; txt_CoinCount = go_Coin.transform.Find("txt_CoinCount").GetComponent <Text>(); txt_UserName = transform.Find("txt_UserName").GetComponent <Text>(); m_StakesCountHint = transform.Find("StakesCountHint").GetComponent <StakesCountHint>(); img_HeadIcon = transform.Find("img_HeadIcon").GetComponent <Image>(); img_Banker = transform.Find("img_Banker").GetComponent <Image>(); txt_StakesSum = transform.Find("StakesSum/txt_StakesSum").GetComponent <Text>(); go_CountDown = transform.Find("CountDown").gameObject; txt_CountDown = transform.Find("CountDown/txt_CountDown").GetComponent <Text>(); CardPoints = transform.Find("CardPoints"); txt_Hint = transform.Find("txt_Hint").GetComponent <Text>(); txt_StakesSum.text = "0"; HideObj(); }
private void Init() { m_Audio = GetComponent <AudioSource>(); m_ZjhManager = GetComponentInParent <ZjhManager_Net>(); btn_UnReady = transform.Find("btn_UnReady").GetComponent <Button>(); btn_UnReady.onClick.AddListener(OnUnReadyButtonClick); go_CompareBtns = transform.Find("CompareBtns").gameObject; btn_CompareLeft = go_CompareBtns.transform.Find("btn_CompareLeft").GetComponent <Button>(); btn_CompareLeft.onClick.AddListener(OnCompareLeftButtonClick); btn_CompareRight = go_CompareBtns.transform.Find("btn_CompareRight").GetComponent <Button>(); btn_CompareRight.onClick.AddListener(OnCompareRightButtonClick); m_StakesCountHint = transform.Find("StakesCountHint").GetComponent <StakesCountHint>(); go_BottomButton = transform.Find("BottomButton").gameObject; img_HeadIcon = transform.Find("img_HeadIcon").GetComponent <Image>(); txt_UserName = transform.Find("txt_UserName").GetComponent <Text>(); txt_CoinCount = transform.Find("Coin/txt_CoinCount").GetComponent <Text>(); img_Banker = transform.Find("img_Banker").GetComponent <Image>(); txt_StakesSum = transform.Find("StakesSum/txt_StakesSum").GetComponent <Text>(); go_CountDown = transform.Find("CountDown").gameObject; txt_CountDown = transform.Find("CountDown/txt_CountDown").GetComponent <Text>(); btn_Ready = transform.Find("btn_Ready").GetComponent <Button>(); btn_Ready.onClick.AddListener(OnReadyButtonClick); txt_Hint = transform.Find("txt_Hint").GetComponent <Text>(); CardPoints = transform.Find("CardPoints"); btn_LookCard = go_BottomButton.transform.Find("btn_LookCard").GetComponent <Button>(); btn_LookCard.onClick.AddListener(OnLookCardButtonClick); btn_FollowStakes = go_BottomButton.transform.Find("btn_FollowStakes").GetComponent <Button>(); btn_FollowStakes.onClick.AddListener(OnFollowButtonClick); btn_AddStakes = go_BottomButton.transform.Find("btn_AddStakes").GetComponent <Button>(); btn_AddStakes.onClick.AddListener(OnAddButtonClick); btn_ComapreCard = go_BottomButton.transform.Find("btn_ComapreCard").GetComponent <Button>(); btn_ComapreCard.onClick.AddListener(OnCopareButtonClick); btn_GiveUp = go_BottomButton.transform.Find("btn_GiveUp").GetComponent <Button>(); btn_GiveUp.onClick.AddListener(OnGiveUpCardButtonClick); tog_2 = go_BottomButton.transform.Find("tog_2").GetComponent <Toggle>(); tog_5 = go_BottomButton.transform.Find("tog_5").GetComponent <Toggle>(); tog_10 = go_BottomButton.transform.Find("tog_10").GetComponent <Toggle>(); btn_LookCard.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; btn_FollowStakes.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; btn_AddStakes.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; btn_ComapreCard.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; btn_GiveUp.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; tog_2.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; tog_5.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; tog_10.GetComponent <Image>().alphaHitTestMinimumThreshold = 0.5f; go_BottomButton.SetActive(false); img_Banker.gameObject.SetActive(false); txt_Hint.gameObject.SetActive(false); go_CountDown.SetActive(false); go_CompareBtns.SetActive(false); btn_UnReady.gameObject.SetActive(false); txt_StakesSum.text = "0"; if (Models.GameModel.userDto != null) { img_HeadIcon.sprite = ResourcesManager.GetSprite(Models.GameModel.userDto.IconName); txt_UserName.text = Models.GameModel.userDto.UserName; txt_CoinCount.text = Models.GameModel.userDto.CoinCount.ToString(); } }