public override void init() { lArea = new List <AreaItem>(); goTemp = this.getGameObjectByPath("tempAreaBt"); last_Temp = this.getGameObjectByPath("s_go"); btClose = this.getComponentByPath <Button>("imgclose"); btClose.onClick.AddListener(onClose); RectTransform rect = goTemp.GetComponent <RectTransform>(); w = rect.sizeDelta.x; h = rect.sizeDelta.y; goTemp.SetActive(false); transCon = transform.FindChild("info/con"); lserver = new List <ServerItem>(); for (int i = 0; i < 10; i++) { ServerItem si = new ServerItem(transform.FindChild("s/s" + i), onServerClick); lserver.Add(si); si.visiable = false; } last_server = new ServerItem(last_Temp.transform, onServerClick); initList(); //changeArea(0); }
public override void init() { this.lArea = new List <AreaItem>(); this.goTemp = base.getGameObjectByPath("tempAreaBt"); this.btClose = base.getComponentByPath <Button>("btclose"); this.btClose.onClick.AddListener(new UnityAction(this.onClose)); RectTransform component = this.goTemp.GetComponent <RectTransform>(); this.w = component.sizeDelta.x; this.h = component.sizeDelta.y; this.goTemp.SetActive(false); this.transCon = base.transform.FindChild("info/con"); this.lserver = new List <ServerItem>(); for (int i = 0; i < 10; i++) { ServerItem serverItem = new ServerItem(base.transform.FindChild("s/s" + i), new Action <ServerData>(this.onServerClick)); this.lserver.Add(serverItem); serverItem.visiable = false; } this.initList(); this.changeArea(0); }