123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- 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<RoomData.Data> onClickRoom { get; set; }
- public Action<ManData.Data> onClickMan { get; set; }
- public Action<PlayData.Data> onClickPlay { get; set; }
- public Action<PlayData.Data> onHoverPlay { get; set; }
- public Action<PlayData.Data> 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<UILabel>(this.m_WindowDesciption, "Text Description", "説明文");
- this.m_DescriptionCache.CacheChildObject<uGUIListViewer>(this.m_WindowDesciption, "Parent Condition", "条件一覧");
- }
- public void OpenRoomList(List<RoomData.Data> roomDataList, RoomData.Data selectingData = null)
- {
- KasizukiPlayInfoCtrl.<OpenRoomList>c__AnonStorey1 <OpenRoomList>c__AnonStorey = new KasizukiPlayInfoCtrl.<OpenRoomList>c__AnonStorey1();
- <OpenRoomList>c__AnonStorey.selectingData = selectingData;
- <OpenRoomList>c__AnonStorey.$this = this;
- ListViewerWindow component = this.m_WindowRoomList.GetComponent<ListViewerWindow>();
- component.Show<RoomData.Data, UIWFTabButton>(roomDataList, delegate(int index, RoomData.Data data, UIWFTabButton item)
- {
- UILabel componentInChildren = item.GetComponentInChildren<UILabel>();
- componentInChildren.text = data.drawName;
- Utility.SetLocalizeTerm(componentInChildren, data.drawNameTerm, false);
- EventDelegate.Add(item.onClick, delegate()
- {
- <OpenRoomList>c__AnonStorey.OnClickRoom(data);
- });
- if (<OpenRoomList>c__AnonStorey.selectingData != null && <OpenRoomList>c__AnonStorey.selectingData == data)
- {
- item.SetSelect(true);
- }
- });
- UIWFTabPanel component2 = component.viewer.parentItemArea.GetComponent<UIWFTabPanel>();
- if (component2)
- {
- component2.UpdateChildren();
- }
- }
- public void OnClickRoom(RoomData.Data roomData)
- {
- if (this.onClickRoom != null)
- {
- this.onClickRoom(roomData);
- }
- }
- public void OpenManList(List<ManData.Data> manDataList, ManData.Data selectingData = null, Action<UIWFTabButton, ManData.Data> onCreate = null)
- {
- KasizukiPlayInfoCtrl.<OpenManList>c__AnonStorey3 <OpenManList>c__AnonStorey = new KasizukiPlayInfoCtrl.<OpenManList>c__AnonStorey3();
- <OpenManList>c__AnonStorey.selectingData = selectingData;
- <OpenManList>c__AnonStorey.onCreate = onCreate;
- <OpenManList>c__AnonStorey.$this = this;
- ListViewerWindow component = this.m_WindowManList.GetComponent<ListViewerWindow>();
- component.Show<ManData.Data, UIWFTabButton>(manDataList, delegate(int index, ManData.Data data, UIWFTabButton item)
- {
- UILabel componentInChildren = item.GetComponentInChildren<UILabel>();
- componentInChildren.text = data.drawName;
- Utility.SetLocalizeTerm(componentInChildren, data.drawNameTerm, false);
- EventDelegate.Add(item.onClick, delegate()
- {
- <OpenManList>c__AnonStorey.OnClickMan(data);
- });
- if (<OpenManList>c__AnonStorey.selectingData != null && <OpenManList>c__AnonStorey.selectingData == data)
- {
- item.SetSelect(true);
- }
- if (<OpenManList>c__AnonStorey.onCreate != null)
- {
- <OpenManList>c__AnonStorey.onCreate(item, data);
- }
- });
- UIWFTabPanel component2 = component.viewer.parentItemArea.GetComponent<UIWFTabPanel>();
- if (component2)
- {
- component2.UpdateChildren();
- }
- }
- public void OnClickMan(ManData.Data manData)
- {
- if (this.onClickMan != null)
- {
- this.onClickMan(manData);
- }
- }
- public void OpenPlayList(List<PlayData.Data> playDataList, PlayData.Data selectingData = null)
- {
- KasizukiPlayInfoCtrl.<OpenPlayList>c__AnonStorey5 <OpenPlayList>c__AnonStorey = new KasizukiPlayInfoCtrl.<OpenPlayList>c__AnonStorey5();
- <OpenPlayList>c__AnonStorey.selectingData = selectingData;
- <OpenPlayList>c__AnonStorey.$this = this;
- ListViewerWindow component = this.m_WindowPlayList.GetComponent<ListViewerWindow>();
- component.Show<PlayData.Data, UIWFTabButton>(playDataList, delegate(int index, PlayData.Data data, UIWFTabButton item)
- {
- UILabel componentInChildren = item.GetComponentInChildren<UILabel>();
- componentInChildren.text = data.drawName;
- Utility.SetLocalizeTerm(componentInChildren, data.drawNameTerm, false);
- EventDelegate.Add(item.onClick, delegate()
- {
- <OpenPlayList>c__AnonStorey.OnClickPlay(data);
- });
- EventDelegate.Add(item.GetComponent<UIEventTrigger>().onHoverOver, delegate()
- {
- <OpenPlayList>c__AnonStorey.OnHoverPlay(data);
- });
- EventDelegate.Add(item.GetComponent<UIEventTrigger>().onHoverOut, delegate()
- {
- <OpenPlayList>c__AnonStorey.OnOutPlay(data);
- });
- EventDelegate.Add(item.transform.Find("hover event").GetComponent<UIEventTrigger>().onHoverOver, delegate()
- {
- <OpenPlayList>c__AnonStorey.OnHoverPlay(data);
- });
- EventDelegate.Add(item.transform.Find("hover event").GetComponent<UIEventTrigger>().onHoverOut, delegate()
- {
- <OpenPlayList>c__AnonStorey.OnOutPlay(data);
- });
- if (<OpenPlayList>c__AnonStorey.selectingData != null && <OpenPlayList>c__AnonStorey.selectingData == data)
- {
- item.SetSelect(true);
- }
- item.isEnabled = data.IsPassed;
- });
- UIWFTabPanel component2 = component.viewer.parentItemArea.GetComponent<UIWFTabPanel>();
- 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;
- }
- }
|