// Use this for initialization void Start() { GameTools.AddClickEvent(backButton.gameObject, this.backButton_ClickEvent); //家校互动 StartCoroutine(GameRoot.Instance.LoadData(2, "21", InitData)); }
void Update() { if (isPlay && Time.time > endTime) { isPlay = false; for (int i = 0; i < itemDataList.Count; i++) { GameObject go = null; if (i % 2 == 0) { go = GameObject.Instantiate(prefab1, prefab1.transform.parent).gameObject; } else { go = GameObject.Instantiate(prefab2, prefab2.transform.parent).gameObject; } go.gameObject.SetActive(true); Page_3_1_ItemData itemData = itemDataList[i]; go.transform.Find("txt_content").GetComponent <Text>().text = itemDataList[i].content; Image image = go.transform.Find("Img/Img_content").GetComponent <Image>(); if (itemData.imgs != null && itemData.imgs.Length > 0) { GameTools.Instance.LoadImage(image, itemData.imgs[0], 4, 4); } GameTools.AddClickEvent(image.gameObject, () => { ClickItem(itemData); }); } } }
void Awake() { GameTools.AddClickEvent(button1.gameObject, this.button_1_ClickEvent); GameTools.AddClickEvent(button2.gameObject, this.button_2_ClickEvent); GameTools.AddClickEvent(button3.gameObject, this.button_3_ClickEvent); GameTools.AddClickEvent(button4.gameObject, this.button_4_ClickEvent); }
void Update() { if (isPlay && Time.time > endTime) { isPlay = false; for (int i = 0; i < List.Count; i++) { GameObject go = GameObject.Instantiate(prefab, prefab.transform.parent); Image img_bg = go.transform.Find("img_bg").gameObject.GetComponent <Image>(); Image image = go.transform.Find("img_Icon").gameObject.GetComponent <Image>(); Text text = go.transform.Find("Text").gameObject.GetComponent <Text>(); Text title = go.transform.Find("title").gameObject.GetComponent <Text>(); go.gameObject.SetActive(true); GameTools.Instance.LoadImage(image, List[i].imgs[0], 4, 4); text.text = List[i].content; title.text = List[i].title; Page_5_2_ItemData data = List[i]; GameTools.AddClickEvent(image.gameObject, () => { ClickItem(data); }); GameTools.AddClickEvent(img_bg.gameObject, () => { ClickItem(data); }); } } }
// Use this for initialization void Start() { foreach (var v in list) { v.gameObject.SetActive(false); } GameTools.AddClickEvent(backBtn.gameObject, this.backButton_ClickEvent); }
// Use this for initialization void Start() { prefab.gameObject.SetActive(false); prefab2.gameObject.SetActive(false); GameTools.AddClickEvent(backButton.gameObject, this.BackButton_ClickEvent); GameTools.AddClickEvent(button2.gameObject, this.ButtonEvent); StartCoroutine(GameRoot.Instance.LoadData(1, DataMgr.mzgz, InitData)); }
// Use this for initialization void Start() { GameTools.AddClickEvent(img1.gameObject, this.backButton_ClickEvent); GameTools.AddClickEvent(img2.gameObject, this.backButton_ClickEvent); GameTools.AddClickEvent(img3.gameObject, this.backButton_ClickEvent); GameTools.AddClickEvent(img4.gameObject, this.backButton_ClickEvent); GameTools.AddClickEvent(img5.gameObject, this.backButton_ClickEvent); }
// Use this for initialization void Start() { GameTools.AddClickEvent(backButton.gameObject, this.BackButton_ClickEvent); prefab.gameObject.SetActive(false); //学生互动 StartCoroutine(GameRoot.Instance.LoadData(2, "20", InitData)); }
// Use this for initialization void Start() { GameTools.AddClickEvent(button1.gameObject, this.BackButton_ClickEvent); //GameTools.Instance.LoadImage(titleImage, "title1.png", 4, 4); text.text = ""; //招生考试 StartCoroutine(GameRoot.Instance.LoadData(2, "9", InitData)); }
// Use this for initialization void Start() { if (prefab == null) { return; } prefab.gameObject.SetActive(false); GameTools.AddClickEvent(backBtn.gameObject, this.BackBtn_ClickEvent); StartCoroutine(GameRoot.Instance.LoadData(1, DataMgr.daShiJi, Init)); }
// Use this for initialization void Start() { GameTools.AddClickEvent(button.gameObject, this.backButton_ClickEvent); prefab.gameObject.SetActive(false); scrollPage.OnPageChanged = OnPageChanged; //学校荣誉 StartCoroutine(GameRoot.Instance.LoadData(2, "7", InitData)); }
// Use this for initialization void Start() { videoDataList = new List <videoData>(); GameTools.AddClickEvent(backBtn.gameObject, this.BackButton_ClickEvent); GameTools.AddClickEvent(UpButton.gameObject, this.UpButton_ClickEvent); GameTools.AddClickEvent(page1Button.gameObject, this.page1Button_ClickEvent); GameTools.AddClickEvent(page2Button.gameObject, this.page2Button_ClickEvent); GameTools.AddClickEvent(page3Button.gameObject, this.page3Button_ClickEvent); GameTools.AddClickEvent(pageNextButton.gameObject, this.pageNextButton_ClickEvent); GameTools.AddClickEvent(videoBackButton.gameObject, this.videoBackButton_ClickEvent); GameTools.AddClickEvent(videoPlayer.gameObject, this.videoBackButton_ClickEvent); StartCoroutine(GameRoot.Instance.LoadData(1, DataMgr.spjk, InitData)); }
// Use this for initialization public void InitData(Page_5_2_ItemData data) { GameTools.AddClickEvent(button.gameObject, this.BackButton_ClickEvent); title_1.text = data.title; title_2.text = data.title; txt_content.text = data.content; LayoutElement rt = txt_content.gameObject.transform.parent.GetComponent <LayoutElement>(); rt.preferredHeight = txt_content.preferredHeight; if (data.imgs.Length == 2) { GameTools.Instance.LoadImage(image1, data.imgs[0], 4, 4); GameTools.Instance.LoadImage(image2, data.imgs[1], 4, 4); } else if (data.imgs.Length == 1) { GameTools.Instance.LoadImage(image1, data.imgs[0], 4, 4); GameTools.Instance.LoadImage(image2, data.imgs[0], 4, 4); } }
// Use this for initialization public void InitData(List <Page_2_3_1_Data> itemDatas) { GameTools.AddClickEvent(button.gameObject, this.BackBtn_ClickEvent); for (int i = 0; i < itemList.Count; i++) { itemList[i].SetActive(false); } for (int i = 0; i < itemDatas.Count; i++) { GameObject go = itemList[i]; Text txt_title = go.transform.Find("txt_title").gameObject.GetComponent <Text>(); txt_title.text = itemDatas[i].title; itemList[i].SetActive(true); Text txt_content = go.transform.Find("Scroll View/Viewport/Content/Text").gameObject.GetComponent <Text>(); txt_content.text = itemDatas[i].content; int curIndex = i; GameTools.AddClickEvent(go.gameObject, () => { ClickItem(go, curIndex); }); } }
void Update() { if (isPlay && Time.time > this.endTime) { mEnhancelScrollView.scrollViewItems = new List <EnhanceItem>(); for (int i = 0; i < ItemDataList.Count; i++) { Page_4_3_ItemData data = ItemDataList[i]; GameObject go = GameObject.Instantiate(prefab.gameObject, prefab.transform.parent).gameObject; MyUGUIEnhanceItem ueItem = go.GetComponent <MyUGUIEnhanceItem>(); go.gameObject.SetActive(true); mEnhancelScrollView.scrollViewItems.Add(ueItem); string imagePath = ""; if (data.imgs != null && data.imgs.Length > 0) { imagePath = data.imgs[0]; } string content = data.content; Image image = go.transform.Find("Img_1").GetComponent <Image>(); Text text = go.transform.Find("txt_1").GetComponent <Text>(); GameTools.Instance.LoadImage(image, imagePath, 4, 4); text.text = content; GameTools.AddClickEvent(image.gameObject, () => { ClickItem(data); }); } isPlay = false; mEnhancelScrollView.gameObject.SetActive(true); } }
void Start() { GameTools.AddClickEvent(this.gameObject, this.OnClickScrollViewItem); }
void Awake() { GameTools.AddClickEvent(backButton.gameObject, this.backButton_ClickEvent); }
// Use this for initialization void Start() { GameTools.AddClickEvent(playImage.gameObject, this.PlayVideo_ClickEvent); }
// Use this for initialization void Start() { GameTools.AddClickEvent(button.gameObject, this.button_1_ClickEvent); //学校介绍 StartCoroutine(GameRoot.Instance.LoadData(2, "4", InitData)); }
// Use this for initialization void Start() { GameTools.AddClickEvent(bgImg.gameObject, this.BackBtn_ClickEvent); }
// Use this for initialization void Start() { GameTools.AddClickEvent(backButton.gameObject, this.backButton_ClickEvent); StartCoroutine(GameRoot.Instance.LoadData(1, DataMgr.xgjy, InitData)); }