void Start() { Image[] temp = enemyHP.GetComponentsInChildren <Image>(); hp_Handle = temp[1]; fullUpdate(1); }
private void Awake() { m_scrollbar = GetComponentInParent <Scrollbar>(); m_scrollbarRect = m_scrollbar.GetComponent <RectTransform>(); m_other = m_scrollbar.GetComponentsInChildren <ScrollbarResizer>(true).Where(r => r != this).First(); m_scrollView = GetComponentInParent <ScrollRect>(); }
public void State_Bar(bool state) { //healthBar.enabled = state; List <Image> healthBarChildrens = new List <Image>(); healthBar.GetComponentsInChildren <Image>(true, healthBarChildrens); if (healthBarChildrens != null) { foreach (Image child in healthBarChildrens) { child.enabled = state; } } //mask.enabled = state; //life.enabled = state; //frame.enabled = state; }
// Use this for initialization void Start() { scbarc = scbar.GetComponentsInChildren <Image>()[1]; }