protected override void AwakeImpl() { base.AwakeImpl(); m_slider = gameObject.GetComponent <UISlider>(); if (m_slider != null) { m_slider.direction = m_direction; m_slider.eventReceiver = gameObject; m_slider.functionName = "OnProgress"; m_slider.thumb = null; applyValue(); } if (m_lblValue == null) { m_lblValue = findChild("Value") as NvUILabel; if (m_lblValue != null) { m_lblValue.setVisible(m_showValue); } } else { m_lblValue.setVisible(m_showValue); } if (m_background == null) { m_background = findChild("Background") as NvUIImage; if (m_background != null) { m_background.setVisible(m_showValue); } } else { m_background.setVisible(m_showValue); } if (m_foreground == null) { m_foreground = findChild("Foreground") as NvUIImage; if (m_foreground != null) { m_foreground.setVisible(m_showValue); } } else { m_foreground.setVisible(m_showValue); } }
public override void setVisible(bool flag) { base.setVisible(flag); if (buttonCaption != null) { buttonCaption.setVisible(flag); } if (buttonBackground != null) { buttonBackground.setVisible(flag); } if (buttonCollider != null) { buttonCollider.gameObject.SetActiveRecursively(flag); } }