Exemplo n.º 1
0
    //void OnChangedHeroParam(PropertyInfo property)
    //{
    //    return;
    //}

    /// <summary> 배치된 지역 보여주기 </summary>
    public void ShowDeployedPlace()
    {
        if (state == HeroSlotState.Territory && string.IsNullOrEmpty(heroData.placeID) == false)
        {
            string placeName = heroData.placeID;
            if (GameDataManager.productionLineBaseDataDic.ContainsKey(heroData.placeID))
            {
                placeName = GameDataManager.productionLineBaseDataDic[heroData.placeID].name;
            }
            else if (GameDataManager.placeBaseDataDic.ContainsKey(heroData.placeID))
            {
                placeName = GameDataManager.placeBaseDataDic[heroData.placeID].name;
            }


            Text text = BattlePanel.GetComponentInChildren <Text>();
            text.text = placeName;
            BattlePanel.SetActive(true);
        }
        else if (state == HeroSlotState.Battle && HeroManager.heroDataDic[id].heroType == HeroData.HeroType.Battle)
        {
            if (heroData != null && string.IsNullOrEmpty(heroData.battleGroupID) == false)
            {
                //HeroData data = HeroManager.heroDataDic[id];
                string dungeonName = GameDataManager.dungeonBaseDataDic[Battle.battleGroupList.Find(x => x.battleType == heroData.battleGroupID).dungeonID].dungeonName;
                Text   text        = BattlePanel.GetComponentInChildren <Text>();
                text.text = dungeonName;
                BattlePanel.SetActive(true);
            }
            else
            {
                BattlePanel.SetActive(false);
            }
        }
        else if (state == HeroSlotState.Training)
        {
            if (string.IsNullOrEmpty(heroData.placeID) == false)
            {
                string placeName = heroData.placeID;
                if (GameDataManager.productionLineBaseDataDic.ContainsKey(heroData.placeID))
                {
                    placeName = GameDataManager.productionLineBaseDataDic[heroData.placeID].name;
                }
                else if (GameDataManager.placeBaseDataDic.ContainsKey(heroData.placeID))
                {
                    placeName = GameDataManager.placeBaseDataDic[heroData.placeID].name;
                }


                Text text = BattlePanel.GetComponentInChildren <Text>();
                text.text = placeName;
                BattlePanel.SetActive(true);
            }
            else if (HeroManager.heroDataDic[id].heroType == HeroData.HeroType.Battle)
            {
                if (heroData != null && string.IsNullOrEmpty(heroData.battleGroupID) == false)
                {
                    string dungeonName = GameDataManager.dungeonBaseDataDic[Battle.battleGroupList.Find(x => x.battleType == heroData.battleGroupID).dungeonID].dungeonName;
                    Text   text        = BattlePanel.GetComponentInChildren <Text>();
                    text.text = dungeonName;
                    BattlePanel.SetActive(true);
                }
                else
                {
                    BattlePanel.SetActive(false);
                }
            }
            else
            {
                BattlePanel.SetActive(false);
            }
        }
        else
        {
            BattlePanel.SetActive(false);
        }
    }