Exemplo n.º 1
0
    private void UpdateBoxItem(int index, RectTransform cell)
    {
        UI_LivenessBoxItem _UI_LivenessBoxItem = cell.GetComponent <UI_LivenessBoxItem>();

        if (_UI_LivenessBoxItem == null)
        {
            _UI_LivenessBoxItem = cell.gameObject.AddComponent <UI_LivenessBoxItem>();
        }
        _UI_LivenessBoxItem.Data(Activitymission_reward_level[index], index);
    }
Exemplo n.º 2
0
    private void CreatBoxInfo()
    {
        for (int i = 0; i < Box_List.transform.childCount; ++i)
        {
            if (Box_List.GetChild(i).gameObject.name == "ItemContaner" + i.ToString())
            {
                m_BoxGameObject[i] = Box_List.GetChild(i).gameObject;
            }
        }

        for (int i = 0; i < m_BoxGameObject.Length; i++)
        {
            UI_LivenessBoxItem _UI_LivenessBoxItem = m_BoxGameObject[i].GetComponent <UI_LivenessBoxItem>();
            if (_UI_LivenessBoxItem == null)
            {
                _UI_LivenessBoxItem = m_BoxGameObject[i].gameObject.AddComponent <UI_LivenessBoxItem>();
            }
            _UI_LivenessBoxItem.Data(Activitymission_reward_level[i], i);
        }
    }