using UnityEngine; public class Menu_Chapter : MenuBase { public ChapterDropInfo m_ChapterDropInfo; public UISprite[] sprites; // 0 쪽지 public UILabel[] labels; // 0 방치 시간, 1 챕터 이름, 2 챕터 설명, 3 쪽지, 4 쪽지시간, 5 쪽지 버튼 이름, 6 장비 프리셋, 7 넘버 챕터, 8 쪽지, 9 쪽지시간 public GameObject go_notebtn, go_notedesc; int m_time, m_bangchientertime = 10, m_Chapter; protected override void Awake() { base.Awake(); Set_Repeat_for1sec(() => { if (m_time > 0) { ++m_time; labels[0].text = (m_bangchientertime - m_time).ToString("N0"); if (m_time > m_bangchientertime) { m_time = 0; EnterChapter(false, 1); // TODO 정인호 : 이거 자체가 필요 없을 수도? 게임 개념이 달라져서 } } }); } public override void Set() { OnClick_NoteDescBack(); Set_UI(); } public void Set_UI() { //m_Chapter = ServerInfo.Ins.m_ServerData.Get_Common(eCommon.Chapter); //var tabledata = table_chaptertext.Ins.Get_Data(m_Chapter); labels[1].text = "이건"; labels[2].text = "어디에"; go_notebtn.SetActive(m_Chapter > 0); //labels[6].text = ServerInfo.Ins.m_ServerData.Equip.Get_Preset_byChapter(1); labels[7].text = "있나요?"; } public void OnClick_EnterWithNote() { //ToastUI.Ins.Set("입장 버튼을 이용해 주세요."); //if (m_Chapter < 101) // EnterChapter(true); //else if (ServerInfo.Ins.m_ServerData.Check_ItemAmount(eItem.MemoryField + (m_Chapter - 101), 1)) // GoChapter(); } public void OnClick_Enter() { NewGameUI.Ins.m_MapChoiceUI.Set(); //EnterChapter(false, 1); } void EnterChapter(bool UseNote, int chapter) { if (UseNote) { GameUI.Ins.LobbyUI.Get_LobbyChapterQuest().Set_UseNote(() => { GoChapter(chapter); }); } else GoChapter(chapter); } void GoChapter(int chapter) { //InGameInfo.Ins.Load_Map(false, () => //{ // InGameInfo.Ins.Start_Chapter(chapter); // var sdata = ServerInfo.Ins.m_ServerData; // if (sdata.Get_PetEquip(0) > 0 && sdata.Get_PetEquip(1) > 0 && sdata.Get_PetEquip(2) > 0) // ServerInfo.Ins.m_ServerData.Add_TitleCondition(44); // 칭호 : 펫과 함께 // if (sdata.Get_PetEquip(0) > 20 && sdata.Get_PetEquip(0) < 25 && sdata.Get_PetEquip(1) > 20 && sdata.Get_PetEquip(1) < 25 && sdata.Get_PetEquip(2) > 20 && sdata.Get_PetEquip(2) < 25) // ServerInfo.Ins.m_ServerData.Add_TitleCondition(45); // 칭호 : 나는 전설이다 // if (sdata.Get_PetEquip(0) > 24 && sdata.Get_PetEquip(1) > 24 && sdata.Get_PetEquip(2) > 24) // ServerInfo.Ins.m_ServerData.Add_TitleCondition(76); // 칭호 : 신화 그 잡채 //}); } public void OnClick_ChapterSelect() { GameUI.Ins.LobbyUI.Get_ChapterSelect().Set(); } public void Go_SelectChapter(int _chapter, bool _entermemory) { var sdata = ServerInfo.Ins.m_ServerData; if (_chapter < 101) Set_UI(); GameUI.Ins.Set_BattleUI(_entermemory); } public void OnClick_Note() { go_notedesc.SetActive(true); } public void OnClick_NoteDescBack() { go_notedesc.SetActive(false); } public void OnClick_Preset() { GameUI.Ins.LobbyUI.Get_PresetUI().Set(1); } }