using System; using System.Collections.Generic; using UnityEngine; using wf; namespace Kasizuki { public class KasizukiPlayInfoCtrl : NGUIWindow { public GameObject windowRoomList { get { return this.m_WindowRoomList; } } public GameObject windowManList { get { return this.m_WindowManList; } } public GameObject windowPlayList { get { return this.m_WindowPlayList; } } public GameObject windowDescriptionList { get { return this.m_WindowDesciption; } } public Action onClickRoom { get; set; } public Action onClickMan { get; set; } public Action onClickPlay { get; set; } public Action onHoverPlay { get; set; } public Action onOutPlay { get; set; } public ObjectCacheDic descriptionCache { get { return this.m_DescriptionCache; } } private void Start() { this.SetUpRoomList(); this.SetUpManList(); this.SetUpPlayList(); this.SetUpDescription(); } private void SetUpRoomList() { this.m_RoomListCache = new ObjectCacheDic(); } private void SetUpManList() { this.m_ManListCache = new ObjectCacheDic(); } private void SetUpPlayList() { this.m_PlayListCache = new ObjectCacheDic(); } private void SetUpDescription() { this.m_DescriptionCache = new ObjectCacheDic(); this.m_DescriptionCache.CacheChildObject(this.m_WindowDesciption, "Text Description", "説明文"); this.m_DescriptionCache.CacheChildObject(this.m_WindowDesciption, "Parent Condition", "条件一覧"); } public void OpenRoomList(List roomDataList, RoomData.Data selectingData = null) { KasizukiPlayInfoCtrl.c__AnonStorey1 c__AnonStorey = new KasizukiPlayInfoCtrl.c__AnonStorey1(); c__AnonStorey.selectingData = selectingData; c__AnonStorey.$this = this; ListViewerWindow component = this.m_WindowRoomList.GetComponent(); component.Show(roomDataList, delegate(int index, RoomData.Data data, UIWFTabButton item) { UILabel componentInChildren = item.GetComponentInChildren(); componentInChildren.text = data.drawName; Utility.SetLocalizeTerm(componentInChildren, data.drawNameTerm, false); EventDelegate.Add(item.onClick, delegate() { c__AnonStorey.OnClickRoom(data); }); if (c__AnonStorey.selectingData != null && c__AnonStorey.selectingData == data) { item.SetSelect(true); } }); UIWFTabPanel component2 = component.viewer.parentItemArea.GetComponent(); if (component2) { component2.UpdateChildren(); } } public void OnClickRoom(RoomData.Data roomData) { if (this.onClickRoom != null) { this.onClickRoom(roomData); } } public void OpenManList(List manDataList, ManData.Data selectingData = null, Action onCreate = null) { KasizukiPlayInfoCtrl.c__AnonStorey3 c__AnonStorey = new KasizukiPlayInfoCtrl.c__AnonStorey3(); c__AnonStorey.selectingData = selectingData; c__AnonStorey.onCreate = onCreate; c__AnonStorey.$this = this; ListViewerWindow component = this.m_WindowManList.GetComponent(); component.Show(manDataList, delegate(int index, ManData.Data data, UIWFTabButton item) { UILabel componentInChildren = item.GetComponentInChildren(); componentInChildren.text = data.drawName; Utility.SetLocalizeTerm(componentInChildren, data.drawNameTerm, false); EventDelegate.Add(item.onClick, delegate() { c__AnonStorey.OnClickMan(data); }); if (c__AnonStorey.selectingData != null && c__AnonStorey.selectingData == data) { item.SetSelect(true); } if (c__AnonStorey.onCreate != null) { c__AnonStorey.onCreate(item, data); } }); UIWFTabPanel component2 = component.viewer.parentItemArea.GetComponent(); if (component2) { component2.UpdateChildren(); } } public void OnClickMan(ManData.Data manData) { if (this.onClickMan != null) { this.onClickMan(manData); } } public void OpenPlayList(List playDataList, PlayData.Data selectingData = null) { KasizukiPlayInfoCtrl.c__AnonStorey5 c__AnonStorey = new KasizukiPlayInfoCtrl.c__AnonStorey5(); c__AnonStorey.selectingData = selectingData; c__AnonStorey.$this = this; ListViewerWindow component = this.m_WindowPlayList.GetComponent(); component.Show(playDataList, delegate(int index, PlayData.Data data, UIWFTabButton item) { UILabel componentInChildren = item.GetComponentInChildren(); componentInChildren.text = data.drawName; Utility.SetLocalizeTerm(componentInChildren, data.drawNameTerm, false); EventDelegate.Add(item.onClick, delegate() { c__AnonStorey.OnClickPlay(data); }); EventDelegate.Add(item.GetComponent().onHoverOver, delegate() { c__AnonStorey.OnHoverPlay(data); }); EventDelegate.Add(item.GetComponent().onHoverOut, delegate() { c__AnonStorey.OnOutPlay(data); }); EventDelegate.Add(item.transform.Find("hover event").GetComponent().onHoverOver, delegate() { c__AnonStorey.OnHoverPlay(data); }); EventDelegate.Add(item.transform.Find("hover event").GetComponent().onHoverOut, delegate() { c__AnonStorey.OnOutPlay(data); }); if (c__AnonStorey.selectingData != null && c__AnonStorey.selectingData == data) { item.SetSelect(true); } item.isEnabled = data.IsPassed; }); UIWFTabPanel component2 = component.viewer.parentItemArea.GetComponent(); if (component2) { component2.UpdateChildren(); } } public void OnClickPlay(PlayData.Data playData) { if (this.onClickPlay != null) { this.onClickPlay(playData); } } private void OnHoverPlay(PlayData.Data playData) { if (this.onHoverPlay != null) { this.onHoverPlay(playData); } } private void OnOutPlay(PlayData.Data playData) { if (this.onOutPlay != null) { this.onOutPlay(playData); } } [SerializeField] private GameObject m_WindowRoomList; [SerializeField] private GameObject m_WindowManList; [SerializeField] private GameObject m_WindowPlayList; [SerializeField] private GameObject m_WindowDesciption; private ObjectCacheDic m_RoomListCache; private ObjectCacheDic m_ManListCache; private ObjectCacheDic m_PlayListCache; private ObjectCacheDic m_DescriptionCache; } }