Beispiel #1
0
    void Start()
    {
        Image[] temp = enemyHP.GetComponentsInChildren <Image>();
        hp_Handle = temp[1];

        fullUpdate(1);
    }
Beispiel #2
0
        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>();
        }
Beispiel #3
0
    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;
    }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     scbarc = scbar.GetComponentsInChildren <Image>()[1];
 }