static public string KingdomEnumToKoreanString(HeroPanel.Hero_Kingdom kingdom) { switch (kingdom) { case HeroPanel.Hero_Kingdom.all: return("국가"); case HeroPanel.Hero_Kingdom.ancient: return("춘추전국"); case HeroPanel.Hero_Kingdom.chock: return("촉나라"); case HeroPanel.Hero_Kingdom.chohan: return("초한쟁패"); case HeroPanel.Hero_Kingdom.etc: return("세외"); case HeroPanel.Hero_Kingdom.han: return("한나라"); case HeroPanel.Hero_Kingdom.oh: return("오나라"); case HeroPanel.Hero_Kingdom.samurai: return("사무라이"); case HeroPanel.Hero_Kingdom.wii: return("위나라"); default: return(""); } }
public void ClickKingdomToggle() { if (toggle_kingdom_all.value) { label_Kingdom.text = "국가"; hero_Kingdom = HeroPanel.Hero_Kingdom.all; } else if (toggle_wii.value) { label_Kingdom.text = "위나라"; hero_Kingdom = HeroPanel.Hero_Kingdom.wii; } else if (toggle_chock.value) { label_Kingdom.text = "촉나라"; hero_Kingdom = HeroPanel.Hero_Kingdom.chock; } else if (toggle_oh.value) { label_Kingdom.text = "오나라"; hero_Kingdom = HeroPanel.Hero_Kingdom.oh; } else if (toggle_han.value) { label_Kingdom.text = "한나라"; hero_Kingdom = HeroPanel.Hero_Kingdom.han; } else if (toggle_etc.value) { label_Kingdom.text = "세외"; hero_Kingdom = HeroPanel.Hero_Kingdom.etc; } else if (toggle_ancient.value) { label_Kingdom.text = "춘추전국"; hero_Kingdom = HeroPanel.Hero_Kingdom.ancient; } else if (toggle_samurai.value) { label_Kingdom.text = "사무라이"; hero_Kingdom = HeroPanel.Hero_Kingdom.samurai; } else if (toggle_chohan.value) { label_Kingdom.text = "초한쟁패"; hero_Kingdom = HeroPanel.Hero_Kingdom.chohan; } WrapSetting(); scrollView.ResetPosition(); SpringPanel.Begin(scrollView.panel.cachedGameObject, scrollView_StartPos, 8); OnOffpanel_Kingdom_Filter(); }
public List <HeroTypeData> GetHeroTypeDatas(HeroPanel.Hero_Element element, HeroPanel.Hero_Kingdom kingdom, HeroPanel.Hero_Class hero_class) { bool chk_kingdom = false; bool chk_element = false; List <HeroTypeData> findHeroDatas = new List <HeroTypeData>(); for (int i = 0; i < heroTypeDatas.Count; i++) { if (element == HeroPanel.Hero_Element.all && kingdom == HeroPanel.Hero_Kingdom.all && hero_class == HeroPanel.Hero_Class.all) { findHeroDatas.Add(heroTypeDatas[i]); continue; } // check conditions // Kingdom check chk_kingdom = false; chk_element = false; if (kingdom != HeroPanel.Hero_Kingdom.all) { chk_kingdom = CheckHaveKingdom(heroTypeDatas[i], kingdom.ToString()); } else { chk_kingdom = true; } if (chk_kingdom) { // element check if (element != HeroPanel.Hero_Element.all) { if (heroTypeDatas[i]._element == element) { chk_element = true; } else { chk_element = false; continue; } } else { chk_element = true; } //class check if (chk_element) { if (hero_class != HeroPanel.Hero_Class.all) { if (heroTypeDatas[i]._hero_class == hero_class) { findHeroDatas.Add(heroTypeDatas[i]); } } else { findHeroDatas.Add(heroTypeDatas[i]); } } } } findHeroDatas = findHeroDatas.Where(x => x._category == "hero" && x._playable == 1 && x._disabled != 1).ToList(); findHeroDatas.Sort(CompareHeroDatas); return(findHeroDatas); }