/// <summary> 별보상 관련 셋팅 </summary> void SetGradeInfo() { List <DungeonTable.ChapterRewardInfo> rewardList = CurChapter.StarReward; for (int i = 0; i < rewardList.Count; i++) { ChapRewardTfs[i].FindChild("con_value_d24").GetComponent <UILabel>().text = rewardList[i].NeedStar.ToString(); GatchaReward.FixedRewardInfo info = _LowDataMgr.instance.GetFixedRewardItem(rewardList[i].Reward); if (info != null) { uint id = info.ItemId; if (id <= 0) { id = info.Type; } InvenItemRewardSlot[i].SetLowDataItemSlot(id, info.ItemCount); } float process = 0; if (0 < i) { if (rewardList[i - 1].NeedStar <= CurChapter.GetClearGrade) //이전꺼를 클리어 했는지 { process = (float)CurChapter.GetClearGrade / (float)rewardList[i].NeedStar; //했다면 함 } } else//첫번째는 걍 함 { process = (float)CurChapter.GetClearGrade / (float)rewardList[i].NeedStar; } ChapRewardTfs[i].FindChild("bar").GetComponent <UISprite>().fillAmount = process; ChapRewardTfs[i].FindChild("boxEff").gameObject.SetActive(false); if (rewardList[i].NeedStar <= CurChapter.GetClearGrade)//1단계 클리어 했는지 { ChapRewardTfs[i].FindChild("getMark").gameObject.SetActive(true); if (CurChapter.CurRewardBoxID - 1 <= i) { ChapRewardTfs[i].FindChild("boxEff").gameObject.SetActive(true); ChapRewardTfs[i].FindChild("getMark").gameObject.SetActive(false); } if (CurChapter.CurRewardBoxID - 1 == i) { rewardIdx = i; } } else { ChapRewardTfs[i].FindChild("getMark").gameObject.SetActive(false); } } }
/// <summary> /// 스테이지 셋팅 /// </summary> /// <param name="list">스테이지 정보 리스트</param> /// <param name="callBack">클릭시 호출될 콜백함수</param> void SetStage(List <ChapterPanel.DataStage> list, System.Action <ChapterPanel.DataStage> callBack) { IsLevelHard = list[0]._StageLowData.StageId >= 10000 ? true : false; for (int i = 0; i < StageObjs.Count; i++) { if (i >= list.Count) { continue; } Transform tf = StageObjs[i].transform; ChapterPanel.DataStage data = list[i]; TweenAlpha tween; if (tf.FindChild("iconeff").gameObject.GetComponent <TweenAlpha>() == null) { tf.FindChild("iconeff").gameObject.AddComponent <TweenAlpha>(); } tween = tf.FindChild("iconeff").gameObject.GetComponent <TweenAlpha>(); tween.transform.gameObject.SetActive(false); //하드모드는 최초보상과 기본보상이존재.. if (IsLevelHard) { GatchaReward.FixedRewardInfo basicInfo = _LowDataMgr.instance.GetFixedRewardItem(list[i]._StageLowData.FixedReward); GatchaReward.FixedRewardInfo firstInfo = _LowDataMgr.instance.GetFixedRewardItem(list[i]._StageLowData.FirstReward); if (basicInfo != null) { BasickRewardSlot[i].SetLowDataItemSlot(basicInfo.ItemId, basicInfo.ItemCount); } if (firstInfo != null) { FirstRewardSlot[i].SetLowDataItemSlot(firstInfo.ItemId, firstInfo.ItemCount); } GameObject fisrtRewardRecieve = tf.FindChild("FirstReward/Receive").gameObject; fisrtRewardRecieve.SetActive(list[i].State == 1); } Quest.QuestInfo quest = QuestManager.instance.GetCurrentQuest(); if (quest != null) //현재 퀘스트가 모험입장쿠ㅔ인가? { if (quest.type == 1 || quest.type == 2) { if (list[i].TableID == quest.ParamId) { tween.style = UITweener.Style.PingPong; tween.from = 0.2f; tween.to = 1f; tween.transform.gameObject.SetActive(true); } } } //클리어 등급 셋팅 int childCount = tf.FindChild("ClearGrade").childCount; for (int j = 0; j < childCount; j++) { Transform gradeTf = tf.FindChild(string.Format("ClearGrade/{0}", j)).GetChild(0); if (gradeTf == null) { break; } if (j < data.TotalClearGrade) { gradeTf.gameObject.SetActive(true); } else { gradeTf.gameObject.SetActive(false); } } ////스테이지 버튼 처리. 난이도 체크 확인하면 지우고 밑에걸로.. bool isEnable = data.State != -1 ? true : false; tf.FindChild("icon_on").gameObject.SetActive(isEnable); tf.FindChild("icon_off").gameObject.SetActive(!isEnable); string namePath = (isEnable ? "icon_on" : "icon_off") + "/name_d4"; UILabel nameLbl = tf.FindChild(namePath).GetComponent <UILabel>(); nameLbl.text = VerticalText(data.StageName); UIEventTrigger uiTri = tf.GetComponent <UIEventTrigger>(); if (uiTri == null) { continue; } EventDelegate.Set(uiTri.onClick, delegate() { callBack(data); }); } }
/// <summary> 메인퀘스트 셋팅 함수 </summary> void SetMainItem(Transform tf, QuestInfo questInfo) { Quest.QuestInfo lowData = _LowDataMgr.instance.GetLowDataQuestData(questInfo.unTaskId); tf.FindChild("Title/Txt_title").GetComponent <UILabel>().text = lowData.Title; //제목 tf.FindChild("Detail/Txt_info").GetComponent <UILabel>().text = lowData.Description; //내용 int count = 0; //아이템있다 if (0 < lowData.rewardItem) { List <GatchaReward.FixedRewardInfo> infoList = _LowDataMgr.instance.GetFixedRewardItemGroupList(lowData.rewardItem); byte myClass = 1; //장비만 직업이다르므로 if (infoList[0].Type == 12) { if (NetData.instance.GetUserInfo().GetCharIdx() == 12000) { myClass = 2; } else if (NetData.instance.GetUserInfo().GetCharIdx() == 13000) { myClass = 3; } } else { myClass = 99; } //내 직업과맞는걸 넣어줘라 GatchaReward.FixedRewardInfo info = new GatchaReward.FixedRewardInfo(); for (int i = 0; i < infoList.Count; i++) { if (infoList[i].ClassType != myClass) { continue; } info = infoList[i]; } tf.FindChild("Reward/item").localPosition = RewardPos[count++]; InvenItemSlotObject slot = null; if (0 < tf.FindChild("Reward/item").childCount) { slot = tf.FindChild("Reward/item").GetChild(0).GetComponent <InvenItemSlotObject>(); } else { GameObject go = UIHelper.CreateInvenSlot(tf.FindChild("Reward/item")); go.collider.enabled = false; slot = go.GetComponent <InvenItemSlotObject>(); } slot.SetLowDataItemSlot(info.ItemId == 0 ? info.Type : info.ItemId, info.ItemCount); UIEventTrigger etri = tf.FindChild("Reward/item").GetComponent <UIEventTrigger>(); EventDelegate.Set(etri.onClick, delegate() { //UIMgr.OpenClickPopup(info.ItemId, tf.FindChild("Reward/item").transform.position); UIMgr.OpenDetailPopup(this, info.ItemId); }); tf.FindChild("Reward/item").gameObject.SetActive(true); } else { tf.FindChild("Reward/item").gameObject.SetActive(false); } if (SetRewardTf(tf.FindChild("Reward/gold"), lowData.rewardGold, false)) { tf.FindChild("Reward/gold").localPosition = RewardPos[count++]; } if (SetRewardTf(tf.FindChild("Reward/exp"), lowData.rewardExp, true)) { tf.FindChild("Reward/exp").localPosition = RewardPos[count++]; } if (QuestManager.instance.GetCurrentQuestInfo().unTaskId != questInfo.unTaskId) { bool isEndQuest = false, isReward = false, isGoto = false; if (questInfo.unComplete == 1) //클리어 { if (questInfo.unFetchBonus == 0) //미수령 { isReward = true; } else//수령 { isEndQuest = true; } } else if (lowData.value != 0)//미 클리어(진행중?) { isGoto = true; //tf.FindChild("slider/value").GetComponent<UILabel>().text = string.Format("{0} / {1}", questInfo.unTargetNum, lowData.value); //tf.FindChild("slider/filled").GetComponent<UISprite>().fillAmount = questInfo.unTargetNum / lowData.value; } //tf.FindChild("Clear").gameObject.SetActive(isEndQuest); tf.FindChild("BtnReward").gameObject.SetActive(isReward); //tf.FindChild("slider").gameObject.SetActive(isGoto); tf.FindChild("BtnGoto").gameObject.SetActive(isGoto); } else//진행중인 미션임. 이거는 버튼이 활성화 되지 않이함. { //tf.FindChild("Clear").gameObject.SetActive(false); tf.FindChild("BtnReward").gameObject.SetActive(false); //tf.FindChild("slider").gameObject.SetActive(false); tf.FindChild("BtnGoto").gameObject.SetActive(false); } }
public short State;//-1은 가지 못하는 지역, 0은 플레이 가능지역, 1은 클리어 지역 public bool InitStageData(uint tableID, byte[] clearInfo, short state, int dailyClearCount) { ClearInfo = clearInfo; _StageLowData = _LowDataMgr.instance.GetStageInfo(tableID); State = state; DailyClearCount = dailyClearCount; if (_StageLowData == null)//없으면 문제인데.. { return(false); } QuestList.Add(new NetData.StageClearData((ClearQuestType)_StageLowData.ClearType1, _StageLowData.ClearValue1)); QuestList.Add(new NetData.StageClearData((ClearQuestType)_StageLowData.ClearType2, _StageLowData.ClearValue2)); QuestList.Add(new NetData.StageClearData((ClearQuestType)_StageLowData.ClearType3, _StageLowData.ClearValue3)); int monsterCount = _StageLowData.regenMonster.Count; AppearMonster = new string[monsterCount]; for (int i = 0; i < monsterCount; i++) { uint m_id = uint.Parse(_StageLowData.regenMonster[i]); Mob.MobInfo mLowData = _LowDataMgr.instance.GetMonsterInfo(m_id); if (mLowData == null) { Debug.Log("MobTable id error " + m_id); continue; } AppearMonster[i] = mLowData.PortraitId; } //아이템은 나의 클래스에 맞춰서 표시해준다. //int myClass = UIHelper.GetClassType(NetData.instance.GetUserInfo().GetCharIdx() ); int addCount = _StageLowData.type == 2 ? 2 : 1; DropItemId = new uint[_StageLowData.rewardItemId.Count + addCount]; // 최초 GatchaReward.FixedRewardInfo firstInfo = _LowDataMgr.instance.GetFixedRewardItem(_StageLowData.FirstReward); if (firstInfo != null) { DropItemId[0] = firstInfo.ItemId == 0 ? firstInfo.Type : firstInfo.ItemId; } if (_StageLowData.type == 2)//어려움만. { GatchaReward.FixedRewardInfo basicInfo = _LowDataMgr.instance.GetFixedRewardItem(_StageLowData.FixedReward); if (basicInfo != null) { DropItemId[1] = basicInfo.ItemId == 0? basicInfo.Type : basicInfo.ItemId; } } for (int i = addCount; i < DropItemId.Length; i++) { uint i_id = uint.Parse(_StageLowData.rewardItemId[i - addCount]); //ui유아이표시 DropItemId[i] = i_id; } return(true); }
/// <summary> 층을 클릭함. </summary> void OnClickFloor(int arr) { if (TowerLowDataList.Count <= arr) { return; } CurrentLowDataArr = arr; DungeonTable.TowerInfo towerLowData = TowerLowDataList[arr]; CurrentFloor.text = string.Format(FloorText, towerLowData.level); //최초 보상 셋팅 GatchaReward.FixedRewardInfo fixedReward = _LowDataMgr.instance.GetFixedRewardItem(towerLowData.FirstReward); FirstReward.SetLowDataItemSlot(fixedReward.ItemId, 0, (key) => { UIMgr.OpenDetailPopup(this, (uint)key); }); //보상아이템 셋팅 List <string> rewardList = towerLowData.rewarditemId.list; int listCount = InvenSlotList.Count; uint myClass = NetData.instance.GetUserInfo().GetCharIdx(); switch (myClass) { case 11000: myClass = 1; break; case 12000: myClass = 2; break; case 13000: myClass = 3; break; } for (int i = 0; i < listCount; i++) { if (rewardList.Count <= i) { InvenSlotList[i].gameObject.SetActive(false); continue; } uint itemId = uint.Parse(rewardList[i]); InvenSlotList[i].gameObject.SetActive(true); Transform slotTf = InvenSlotList[i].transform; InvenSlotList[i].SetLowDataItemSlot(itemId, 0, (lowDataId) => { UIMgr.OpenDetailPopup(this, (uint)lowDataId); }); } ItemScroll.enabled = true; ItemScroll.ResetPosition(); if (rewardList.Count <= 4) { ItemScroll.enabled = false; } if (towerLowData.level < LastClearFloor)//클리어함 { FirstRewardClear.SetActive(true); } else//미클리어 { FirstRewardClear.SetActive(false); } if (LastClearFloor - 1 == arr) { SelectEff.localPosition = new Vector2(-1000, 1000); } else { Transform effTf = FloorGrid.transform.GetChild(arr).FindChild("eff_root"); SelectEff.parent = effTf; SelectEff.localPosition = Vector3.zero; SelectEff.localScale = Vector3.one; } //랭킹 NetworkClient.instance.SendPMsgTowerRankQueryC(towerLowData.level); }
/// <summary> 보상아이템 셋팅 </summary> void SettingRewardItem() { if (G_GameInfo.GameMode == GAME_MODE.ARENA) { RewardAssetTf.parent.gameObject.SetActive(false); return; } RewardAssetTf.parent.gameObject.SetActive(true); RewardAssetTf.gameObject.SetActive(false); RewardExp.gameObject.SetActive(false); RewardGold.gameObject.SetActive(false); uint firstRewardId = 0; uint fixedRewardId = 0; if (G_GameInfo.GameMode == GAME_MODE.SINGLE && isSuccess) { DungeonTable.StageInfo lowData = _LowDataMgr.instance.GetStageInfo(SingleGameState.lastSelectStageId); //최초보상이 있을씨에.. if (SingleGameState.IsFirstReward) { GatchaReward.FixedRewardInfo firstInfo = _LowDataMgr.instance.GetFixedRewardItem(lowData.FirstReward); GameObject go = Instantiate(ItemSlotPrefab) as GameObject; Transform tf = go.transform; tf.parent = RewardGrid.transform; tf.localPosition = Vector3.zero; tf.localScale = Vector3.one; InvenItemSlotObject firstSlotObj = go.GetComponent <InvenItemSlotObject>(); firstSlotObj.SetLowDataItemSlot(firstInfo.ItemId == 0 ? firstInfo.Type : firstInfo.ItemId, firstInfo.ItemCount); FirstRewardSlotLabel.transform.parent = go.transform; FirstRewardSlotLabel.transform.localPosition = new Vector3(0, 42, 0); FirstRewardSlotLabel.transform.localScale = Vector3.one; FirstRewardSlotLabel.SetActive(true); firstRewardId = firstInfo.ItemId == 0 ? firstInfo.Type : firstInfo.ItemId; } // 기본보상표시 0이면안준다 if (lowData.FixedReward != 0) { GatchaReward.FixedRewardInfo basicInfo = _LowDataMgr.instance.GetFixedRewardItem(lowData.FixedReward); GameObject basicGo = Instantiate(ItemSlotPrefab) as GameObject; Transform basicTf = basicGo.transform; basicTf.parent = RewardGrid.transform; basicTf.localPosition = Vector3.zero; basicTf.localScale = Vector3.one; InvenItemSlotObject basicSlotObj = basicGo.GetComponent <InvenItemSlotObject>(); basicSlotObj.SetLowDataItemSlot(basicInfo.ItemId == 0 ? basicInfo.Type : basicInfo.ItemId, basicInfo.ItemCount); BasicRewardSlotLabel.transform.parent = basicGo.transform; BasicRewardSlotLabel.transform.localPosition = new Vector3(0, 42, 0); BasicRewardSlotLabel.transform.localScale = Vector3.one; BasicRewardSlotLabel.SetActive(true); fixedRewardId = basicInfo.ItemId == 0 ? basicInfo.Type : basicInfo.ItemId; } } List <NetData.DropItemData> dropItemList = Reward.GetList; if (dropItemList != null) { int count = dropItemList.Count; for (int i = 0; i < count; i++) { NetData.DropItemData dropData = dropItemList[i]; //위에 표기됬으므로 표기안해줌 if (dropData.LowDataId == fixedRewardId) { continue; } if (dropData.LowDataId == firstRewardId) { continue; } GameObject go = Instantiate(ItemSlotPrefab) as GameObject; Transform tf = go.transform; tf.parent = RewardGrid.transform; tf.localPosition = Vector3.zero; tf.localScale = Vector3.one; InvenItemSlotObject slotObj = go.GetComponent <InvenItemSlotObject>(); slotObj.SetLowDataItemSlot(dropData.LowDataId, dropData.Amount); } RewardGrid.repositionNow = true; } if (5 < RewardGrid.transform.childCount) { RewardGrid.transform.parent.GetComponent <UIScrollView>().enabled = true; } else { RewardGrid.transform.parent.GetComponent <UIScrollView>().enabled = false; } if (G_GameInfo.GameMode == GAME_MODE.SINGLE)//GAME_MODE.SPECIAL) { return; } else { //획득 재화 설정 bool isGoldDungeon = false, isExpDungeon = false; if (G_GameInfo.GameMode == GAME_MODE.SPECIAL_EXP) { isExpDungeon = true; } else if (G_GameInfo.GameMode == GAME_MODE.SPECIAL_GOLD) { isGoldDungeon = true; } AssetType assetType = AssetType.None; if (G_GameInfo.GameMode == GAME_MODE.TOWER) { assetType = AssetType.Badge; } if (0 <= Reward.GetCoin && !isExpDungeon) { RewardGold.gameObject.SetActive(true); RewardGold.text = Reward.GetCoin == 0 ? "0" : Reward.GetCoin.ToString(); // ToString("#,##"); } if (0 <= Reward.GetExp && !isGoldDungeon) { RewardExp.gameObject.SetActive(true); RewardExp.text = Reward.GetExp == 0 ? "0" : Reward.GetExp.ToString(); // ToString("#,##"); } if (0 <= Reward.GetAsset && assetType != AssetType.None) { RewardAssetTf.gameObject.SetActive(true); RewardAssetTf.GetComponent <UILabel>().text = Reward.GetAsset == 0 ? "0" : Reward.GetAsset.ToString(); // ToString("#,##"); UISprite sp = RewardAssetTf.FindChild("icon").GetComponent <UISprite>(); switch (assetType) { case AssetType.Badge: sp.spriteName = "badge_A"; //Img_flag2 break; } } } }
/// <summary> 비동기 방식의 게임들 결과화면 </summary> void ResultDungeon() { if (G_GameInfo.GameMode == GAME_MODE.SINGLE) { //현재 최초보상받을수있는지 체크? DungeonTable.StageInfo lowData = _LowDataMgr.instance.GetStageInfo(SingleGameState.lastSelectStageId); if (lowData != null) { //if (lowData.type == 2 && isSuccess) // { if (SingleGameState.IsFirstReward) { GatchaReward.FixedRewardInfo firstInfo = _LowDataMgr.instance.GetFixedRewardItem(lowData.FirstReward); //최초보상받을시기? GameObject go = Instantiate(ItemSlotPrefab) as GameObject; Transform tf = go.transform; tf.parent = FirstRewardPopup.transform.FindChild("Icon").transform; tf.localPosition = Vector3.zero; tf.localScale = Vector3.one; UILabel name = FirstRewardPopup.transform.FindChild("Txt_Iconname").GetComponent <UILabel>(); InvenItemSlotObject slotObj = go.GetComponent <InvenItemSlotObject>(); slotObj.SetLowDataItemSlot(firstInfo.ItemId == 0? firstInfo.Type : firstInfo.ItemId, firstInfo.ItemCount); Item.EquipmentInfo equipInfo = _LowDataMgr.instance.GetLowDataEquipItemInfo(firstInfo.ItemId); if (equipInfo != null) //장비 { name.text = _LowDataMgr.instance.GetStringItem(equipInfo.NameId); } else { uint id = 0; //혹시 재화인가.... if (firstInfo.ItemId == 0) { switch (firstInfo.Type) { case 1: //골드 id = 599000; break; case 2: //원보 id = 599001; break; case 3: //공헌 id = 599004; break; case 4: //명예 id = 599005; break; case 5: //휘장 id = 599002; break; case 6: //사자왕 id = 599006; break; case 7: //성망 id = 599003; break; case 8: //체력 id = 599104; break; case 9: //경험치; id = 599105; break; } name.text = _LowDataMgr.instance.GetStringItem(_LowDataMgr.instance.GetUseItem(firstInfo.ItemId == 0 ? id : firstInfo.ItemId).NameId); } else { name.text = _LowDataMgr.instance.GetStringItem(_LowDataMgr.instance.GetUseItem(firstInfo.ItemId).NameId); } } SetRenderQueue renderQ = UIHelper.FindComponent <SetRenderQueue>(FirstRewardPopup.transform.FindChild("Effect")); if (renderQ != null) { renderQ.ResetRenderQ(3031); } FirstRewardPopup.SetActive(true); TempCoroutine.instance.FrameDelay(0.1f, () => { FirstRewardPopup.transform.GetComponent <TweenScale>().ResetToBeginning(); FirstRewardPopup.transform.GetComponent <TweenScale>().PlayForward(); }); TempCoroutine.instance.FrameDelay(3f, () => { FirstRewardPopup.SetActive(false); }); } } // } if (isSuccess && SceneManager.instance.CurTutorial == TutorialType.STAGE)//튜토리얼 중 스테이지 클리어했다면 { SceneManager.instance.CurTutorial = TutorialType.STAGE; } } Reward = NetData.instance._RewardData; if (Reward == null)//없으면 안돼겠지만. 뻑은 안나게.. { Reward = new NetData.RewardData(); } uint curExp = 0, maxExp = 0, level = 0; if (Reward.GetExp <= 0)//획득 경험치가 있다면 뭔가 데이터가 있다는 것임. { level = NetData.instance.UserLevel; NetData.instance.GetUserInfo().GetCurrentAndMaxExp(ref curExp, ref maxExp); } else { curExp = Reward.SaveExp; maxExp = Reward.SaveMaxExp; level = Reward.SaveLevel; } ExpGauge.value = (float)curExp / (float)maxExp; Labels[(int)labelT.hLv].text = string.Format(_LowDataMgr.instance.GetStringCommon(453), level); SettingRewardItem(); if (G_GameInfo.GameMode == GAME_MODE.SINGLE)//싱글게임에만 스테이지 퀘스트가 존재. { StartCoroutine("MissionResult"); } else if (G_GameInfo.GameMode != GAME_MODE.ARENA) { Result(); } if (isSuccess) { TitleObj[0].SetActive(true); UIHelper.CreateEffectInGame(TitleObj[0].transform.FindChild("bg"), "Fx_UI_exp_result_01"); } else { TitleObj[1].SetActive(true); } }
public void NoticePop(NoticeType type, uint condition, string str, object obj) { Debug.Log(string.Format("<color=yellow>NoticePanel RunType={0}</color>", type)); Transform typeTf = NoticeGo[(int)type].transform; bool notActive = false; switch (type) { case NoticeType.PowerUp: //전투력 NetData._UserInfo charInven = NetData.instance.GetUserInfo(); if (charInven == null) { return; } int maxValue = (int)charInven.RefreshTotalAttackPoint(false); if (uiMgr.PrevAttack == maxValue) { return; } notActive = true; NoticeGo[(int)type].SetActive(true); _StatUpData.StatUpInit(uiMgr.PrevAttack, maxValue, StatUpLbl[0], typeTf.FindChild("effRoot")); int value = maxValue - uiMgr.PrevAttack; StatUpLbl[1].text = string.Format("{0}{1}[-]", value < 0 ? "[e84d29]" : "[FFFFFF]", value); uiMgr.PrevAttack = maxValue; break; case NoticeType.Achiev: //업적 string[] achievData = str.Split(','); AchieveType = uint.Parse(achievData[0]); AchieveSubType = uint.Parse(achievData[1]); AchieveLv = uint.Parse(achievData[2]); AchieveTabType = uint.Parse(achievData[3]); if (!TownState.TownActive) { return; } else { UIBasePanel gachaPanel = UIMgr.GetUIBasePanel("UIPanel/GachaPanel"); if (gachaPanel != null && !(gachaPanel as GachaPanel).IsEndAni) { return; } } notActive = true; break; case NoticeType.LevelUp: //레벨업 GameObject go = UIHelper.CreateEffectInGame(NoticeGo[(int)NoticeType.LevelUp].transform, "Fx_UI_levelup_01" + SystemDefine.LocalEff); Destroy(go, 2f); _LevelUpData.TimeInit(0, 2f); break; case NoticeType.Quest: //퀘스트 클리어 Quest.QuestInfo info = _LowDataMgr.instance.GetLowDataQuestData(condition); if (info == null) { return; } QuestLbl[0].text = info.Title; QuestLbl[1].text = info.LeftDescription; float questDuration = 0; List <UITweener> tweenList = UIHelper.FindComponents <UITweener>(typeTf); for (int i = 0; i < tweenList.Count; i++) { tweenList[i].ResetToBeginning(); tweenList[i].PlayForward(); if (questDuration < tweenList[i].delay + tweenList[i].duration) { questDuration = tweenList[i].delay + tweenList[i].duration; } } _QuestData.TimeInit(0, questDuration); break; case NoticeType.Message: //메세지 string msg = null; if (0 < condition) { msg = _LowDataMgr.instance.GetStringCommon(condition); } else { msg = str; } for (int i = NoticeLbl.Length - 1; 0 < i; i--) { int arr = i - 1; NoticeLbl[i].color = NoticeLbl[arr].color; NoticeLbl[i].text = NoticeLbl[arr].text; NoticeDelay[i] = NoticeDelay[arr]; } IsMsgUpdate = true; NoticeDelay[0] = 1; NoticeLbl[0].color = Color.white; NoticeLbl[0].text = msg; break; case NoticeType.System: //공지 시스템 메세지 처리 MessageData systemData = new MessageData(); systemData.MsgInit(str, SystemPos.duration + SystemPos.delay, SystemLbl, SystemPos); SystemList.Add(systemData); notActive = true; break; case NoticeType.Game: //게임 알림(장비 습득 등) 메세지 처리 MessageData gameData = new MessageData(); gameData.MsgInit(str, GameOpenDuration + GameHideDuration + GameHideDelay, GameLbl, GameAlpha); gameData.SetAlphaData(GameOpenDuration, GameHideDuration, GameHideDelay); GameList.Add(gameData); notActive = true; break; case NoticeType.GetMailItem: //우편함에서 얻은 아이템 if (0 < condition) { Quest.QuestInfo lowData = _LowDataMgr.instance.GetLowDataQuestData(condition); if (0 < lowData.rewardGold) { GetItemList.Add(new NetData.EmailAttachmentInfo((int)AssetType.Gold, (int)AssetType.Gold, lowData.rewardGold)); } if (0 < lowData.rewardEnergy) { GetItemList.Add(new NetData.EmailAttachmentInfo((int)AssetType.Energy, (int)AssetType.Energy, lowData.rewardEnergy)); } if (0 < lowData.rewardExp) { GetItemList.Add(new NetData.EmailAttachmentInfo((int)AssetType.Exp, (int)AssetType.Exp, lowData.rewardExp)); } if (0 < lowData.rewardItem) { GatchaReward.FixedRewardInfo gatcha = _LowDataMgr.instance.GetFixedRewardItem(lowData.rewardItem); if (gatcha != null) { if (gatcha.ClassType != 99) { int classType = UIHelper.GetClassType(NetData.instance.GetUserInfo()._userCharIndex); List <GatchaReward.FixedRewardInfo> gachaList = _LowDataMgr.instance.GetFixedRewardItemGroupList(lowData.rewardItem); for (int i = 0; i < gachaList.Count; i++) { if (gachaList[i].ClassType != classType) { continue; } GetItemList.Add(new NetData.EmailAttachmentInfo(gachaList[i].Type, gachaList[i].ItemId, gachaList[i].ItemCount)); break; } } else { GetItemList.Add(new NetData.EmailAttachmentInfo(gatcha.Type, gatcha.ItemId, gatcha.ItemCount)); } } } } else if (obj != null) { List <NetData.EmailAttachmentInfo> mailList = (List <NetData.EmailAttachmentInfo>)obj; GetItemList.AddRange(mailList); } if (GetItemList.Count <= 0) { return; } TempCoroutine.instance.RemoveKeyDelay("GetMailItem"); SoundManager.instance.PlaySfxSound(eUISfx.UI_reward_popup, false); break; case NoticeType.GetItem: //획득 아이템 연출. GetItemData data; data.IconId = condition; data.IsShard = (bool)obj; GetUseItemList.Add(data); notActive = true; if (_GetItemData.IsStart) //이미 시작중이라면. { //NoticeGo[(int)NoticeType.GetItem].SetActive(true); bool create = false; Transform itemTf = null; if (GetUseItemList.Count - 1 < typeTf.childCount) { itemTf = typeTf.GetChild(GetUseItemList.Count - 1); } else { itemTf = Instantiate(typeTf.GetChild(0)) as Transform; itemTf.parent = typeTf; itemTf.localPosition = Vector3.zero; itemTf.localScale = Vector3.one; create = true; } itemTf.gameObject.SetActive(true); float delay = 0; List <UITweener> tweener = UIHelper.FindComponents <UITweener>(itemTf); for (int j = 0; j < tweener.Count; j++) { if (create) { tweener[j].delay += (GetUseItemList.Count - 1) * 0.05f; } if (delay < tweener[j].duration + tweener[j].delay) { delay = tweener[j].duration + tweener[j].delay; } tweener[j].ResetToBeginning(); tweener[j].PlayForward(); } UISprite sp = itemTf.FindChild("icon").GetComponent <UISprite>(); sp.spriteName = _LowDataMgr.instance.GetLowDataIcon(data.IconId); sp.atlas = AtlasMgr.instance.GetLoadAtlas(data.IsShard ? LoadAtlasType.Shard : LoadAtlasType.UseItem); _GetItemData.TimeInit(0, delay); } break; case NoticeType.Contents: uint locKey = 0; string iconName = null; switch ((OpenContentsType)condition) { case OpenContentsType.Char: //오픈연출타입 캐릭터 iconName = "costume_btn"; locKey = 65; break; case OpenContentsType.Achiev: //오픈연출타입 업적 iconName = "achi_btn"; locKey = 247; break; case OpenContentsType.Benefit: //오픈연출타입 혜택 iconName = "benefit_btn"; locKey = 681; break; case OpenContentsType.Social: //오픈연출타입 소셜 iconName = "social_btn"; locKey = 678; break; case OpenContentsType.Dungeon: //오픈연출타입 컨텐츠 iconName = "dungeon_btn"; locKey = 10; break; case OpenContentsType.Shop: //오픈연출타입 상품 iconName = "pvp_shop"; locKey = 462; break; case OpenContentsType.Partner: //오픈연출타입 파트너 iconName = "firend_btn"; locKey = 7; break; case OpenContentsType.FreeFight: //오픈연출타입 난투장 iconName = "free_btn"; locKey = 12; break; case OpenContentsType.Rank: //오픈연출타입 랭킹 iconName = "ranking_btn"; locKey = 161; break; case OpenContentsType.Guilde: //오픈연출타입 길드 iconName = "guild_btn"; locKey = 8; break; case OpenContentsType.Category: //오픈연출타입 재화인벤 iconName = "inven_btn"; locKey = 1287; break; case OpenContentsType.Chapter: //오픈연출타입 재화인벤 iconName = "adventure_btn"; locKey = 9; break; } string systemMsg = string.Format(_LowDataMgr.instance.GetStringCommon(9924), _LowDataMgr.instance.GetStringCommon(locKey)); typeTf.FindChild("Icon").GetComponent <UISprite>().spriteName = iconName; typeTf.FindChild("Icon/Label_01").GetComponent <UILabel>().text = _LowDataMgr.instance.GetStringCommon(locKey); typeTf.FindChild("Icon/Label_02").GetComponent <UILabel>().text = _LowDataMgr.instance.GetStringCommon(locKey); typeTf.FindChild("Txt_Title").GetComponent <UILabel>().text = systemMsg; UIMgr.AddLogChat(systemMsg); SetRenderQueue renderQ = UIHelper.FindComponent <SetRenderQueue>(typeTf.FindChild("Effect")); if (renderQ != null) { renderQ.ResetRenderQ(GetComponent <UIPanel>().startingRenderQueue + 1); } UITweener openTween = typeTf.GetComponent <UITweener>(); openTween.ResetToBeginning(); openTween.PlayForward(); break; } if (!notActive) { NoticeGo[(int)type].SetActive(true); } }