void OnClick () { // base.OnClick (); if (parentTapContent == null) parentTapContent = transform.parent.GetComponent<TapContentBase> (); if (parentTapContent == null) return; try { parentTapContent.changeTapPage (this); } catch (System.Exception ex) { if (GameManager.DEBUG) { throw ex; } } }
//void FixedUpdate() //{ // showAward(); //} /** 更新Tap容器 */ private void updateTapContent() { // if(!StarSoulConfigManager.Instance.isEnoughByShowHuntVipLevel()) { // tapContent=commonTapContent; // currentTapIndex=StarSoulConfigManager.HUNT_MONEY_TYPE; // commonTapContent.gameObject.SetActive(true); // vipTapContent.gameObject.SetActive(false); // } else { tapContent = vipTapContent; commonTapContent.gameObject.SetActive(false); vipTapContent.gameObject.SetActive(true); if (!StarSoulConfigManager.Instance.isEnoughByHuntVipLevel()) { TapButtonBase tapButtonBase = vipTapContent.getTapButtonByIndex(1); if (tapButtonBase != null) { tapButtonBase.doEventButNoActive = true; } } // } }
public virtual void setTapPageState () { //空引用检测 if (parentTapContent == null) parentTapContent = transform.parent.GetComponent<TapContentBase> (); if (parentTapContent == null) return; //关联窗口 if (fatherWindow == null) fatherWindow = parentTapContent.fatherwindow; if(isDisable()){ return; } if(outLineColor==Colors.BACKGROUND_NONE) { outLineColor=textLabel.effectColor; } if (IsActiveTapPage == false) { setNormalSprite (parentTapContent.normalImageName); textLabel.color = TapContentBase.normalLabelColor; textLabel.effectColor = Colors.BUTTON_TEXT_OUTLINE_DISABLEL; UISprite uiSprite=ngui_buttonScript.tweenTarget.GetComponent<UISprite> (); uiSprite.width = (int)parentTapContent.normalSize.x; uiSprite.height = (int)parentTapContent.normalSize.y; uiSprite.color = TapContentBase.normalSpriteColor; } else { setNormalSprite (parentTapContent.activeImageName); textLabel.color = TapContentBase.activeLabelColor; textLabel.effectColor = outLineColor; UISprite uiSprite=ngui_buttonScript.tweenTarget.GetComponent<UISprite> (); uiSprite.color = TapContentBase.activeSpriteColor; uiSprite.width = (int)parentTapContent.activeSize.x; uiSprite.height = (int)parentTapContent.activeSize.y; } }
/** 更新Tap容器 */ private void updateTapContent() { if (UserManager.Instance.self.getUserLevel() < refineweapon) { tapBase1.gameObject.SetActive(false); tapBase.gameObject.SetActive(false); tapBase2.gameObject.SetActive(true); tapContent = tapBase2; } else if (UserManager.Instance.self.getUserLevel() < magicWeaponLv) { tapBase.gameObject.SetActive(true); tapBase1.gameObject.SetActive(false); tapBase2.gameObject.SetActive(false); tapContent = tapBase; } else { tapBase.gameObject.SetActive(false); tapBase1.gameObject.SetActive(true); tapBase2.gameObject.SetActive(false); tapContent = tapBase1; } }