public void SetAnnounceContent(int _index, UIAnnounceCell _Script) { if (_index < mTitleList.Length) { mUIAnnounce.SetContent(mContentList[_index]); } if (mChooseScript != null) { mChooseScript.SetBtnStatus(false); } mChooseScript = _Script; { mChooseScript.SetBtnStatus(true); } }
public void CreateAnnounceCell() { if (mUIAnnounceCellList.Count != 0) { return; } GameObject obj1 = PrefabLoader.loadFromPack("LS/pbLSAnnounceCell") as GameObject; if (obj1 != null) { for (int i = 0; i < mTitleList.Length; i++) { GameObject go = NGUITools.AddChild(_Grid, obj1); go.gameObject.name = (1000 + i).ToString(); UIAnnounceCell mm = go.gameObject.GetComponent <UIAnnounceCell>(); mUIAnnounceCellList.Add(mm); } mUIAnnounceCellList[0].SetBtnStatus(true); mChooseScript = mUIAnnounceCellList[0]; } }