void Show(DictionaryTapType tab = DictionaryTapType.Battle, DicionaryState state = DicionaryState.Default) { if (coroutineShow != null) { return; } // SortHeroList(); if (tab == DictionaryTapType.Battle) { battleScrollViewContent.gameObject.SetActive(true); territoryScrollViewContent.gameObject.SetActive(false); } else { battleScrollViewContent.gameObject.SetActive(false); territoryScrollViewContent.gameObject.SetActive(true); } //for (int i = 0; i < heroSlotContainerList.Count; i++) //{ // if(heroSlotContainerList[i].heroInvenID == HeroManager.heroDataList[i].heroID) // { // heroSlotContainerList[i].GetComponentInChildren<UIHeroSlot>().heroImage.color = new Color(255, 255, 255); // } //} coroutineShow = StartCoroutine(ShowA(tab, state)); }
public void SlotDataInit(string _id, DicionaryState _state) { texture = null; id = _id; state = _state; dictionaryLevel = heroDicData.dictionaryLevel; heroDicData.onChangedValue += OnChangedHeroParam; InitUI(); }
IEnumerator ShowA(DictionaryTapType tab, DicionaryState state) { //인벤토리 열릴시 NewCheck해제 //onCheckNewHeroEarned(); SizeControl(); //canvas.enabled = false; canvas.gameObject.SetActive(true); for (int i = 0; i < heroSlotList.Count; i++) { heroSlotList[i].state = state; } battleScrollRect.gameObject.SetActive(tab == DictionaryTapType.Battle); territoryScrollRect.gameObject.SetActive(tab == DictionaryTapType.Territory); yield return(null); if (tab == DictionaryTapType.Battle) { battleScrollRect.normalizedPosition = new Vector2(battleScrollRect.normalizedPosition.x, 1f); } else if (tab == DictionaryTapType.Territory) { territoryScrollRect.normalizedPosition = new Vector2(territoryScrollRect.normalizedPosition.x, 1f); } battleScrollRect.GetComponent <CanvasRenderer>().SetAlpha(1f); territoryScrollRect.GetComponent <CanvasRenderer>().SetAlpha(1f); canvas.enabled = true; coroutineShow = null; yield break; }