void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); m_lblInstanceTreasureChestUITitle = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUITitle"]).GetComponent <UILabel>(); m_lblInstanceTreasureChestUIDesc = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIDesc"]).GetComponent <UILabel>(); m_goInstanceTreasureChestUIBtnOK = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIBtnOK"]).gameObject; m_goInstanceTreasureChestUIBtnGet = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIBtnGet"]).gameObject; m_listInstaceRewardItem.Add(m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIRewardItem0"]).gameObject); m_listInstaceRewardItem.Add(m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIRewardItem1"]).gameObject); m_listInstaceRewardItem.Add(m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIRewardItem2"]).gameObject); for (int i = 0; i < m_listInstaceRewardItem.Count; i++) { m_listInstaceRewardItem[i].AddComponent <InventoryGrid>(); } m_goGOInstanceTreasureChestUIRewardList = m_myTransform.Find(m_widgetToFullName["GOInstanceTreasureChestUIRewardList"]).gameObject; m_goInstanceTreasureChestUIRewardPos1 = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIRewardPos1"]).gameObject; m_goInstanceTreasureChestUIRewardPos2 = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIRewardPos2"]).gameObject; m_goInstanceTreasureChestUIRewardPos3 = m_myTransform.Find(m_widgetToFullName["InstanceTreasureChestUIRewardPos3"]).gameObject; Initialize(); }
void Awake() { m_instance = this; m_myTransform = transform; FillFullNameData(m_myTransform); m_lblInstanceTreasureChestUITitle = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUITitle"]).GetComponent<UILabel>(); m_lblInstanceTreasureChestUIDesc = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIDesc"]).GetComponent<UILabel>(); m_goInstanceTreasureChestUIBtnOK = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIBtnOK"]).gameObject; m_goInstanceTreasureChestUIBtnGet = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIBtnGet"]).gameObject; m_listInstaceRewardItem.Add(m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIRewardItem0"]).gameObject); m_listInstaceRewardItem.Add(m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIRewardItem1"]).gameObject); m_listInstaceRewardItem.Add(m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIRewardItem2"]).gameObject); for (int i = 0; i < m_listInstaceRewardItem.Count; i++) { m_listInstaceRewardItem[i].AddComponent<InventoryGrid>(); } m_goGOInstanceTreasureChestUIRewardList = m_myTransform.FindChild(m_widgetToFullName["GOInstanceTreasureChestUIRewardList"]).gameObject; m_goInstanceTreasureChestUIRewardPos1 = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIRewardPos1"]).gameObject; m_goInstanceTreasureChestUIRewardPos2 = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIRewardPos2"]).gameObject; m_goInstanceTreasureChestUIRewardPos3 = m_myTransform.FindChild(m_widgetToFullName["InstanceTreasureChestUIRewardPos3"]).gameObject; Initialize(); }