Ejemplo n.º 1
0
 public void SetUpItem(LeaderStoryInfo info)
 {
     if (info != null)
     {
         _info = info;
         transform.FindTransfrom("Year").SafeGetComponent <Text>().text = info.year.ToString();
     }
     UpdateSelectState(false);
 }
Ejemplo n.º 2
0
        public static LeaderStoryInfo InitStoryInfo(int storyID)
        {
            LeaderStoryInfo info = new LeaderStoryInfo();
            var             meta = LeaderModule.GetLeaderStoryDataByKey(storyID);

            if (meta == null)
            {
                DebugPlus.LogError("Init LeaderStoryInfo Error! storyID=" + storyID);
                return(null);
            }
            info.storyID      = meta.StoryID;
            info.storyContent = MultiLanguage.Instance.GetTextValue(meta.Content);
            info.year         = meta.StoryYearStart;
            info.poolLevel    = meta.PoolLevel;

            return(info);
        }
Ejemplo n.º 3
0
        public static List <LeaderStoryInfo> GetLeaderPresetStory(int leaderID)
        {
            List <LeaderStoryInfo> result = new List <LeaderStoryInfo>();
            var leaderMeta = GetLeaderPresetDataByKey(leaderID);

            if (leaderMeta != null)
            {
                var list = Utility.TryParseIntList(leaderMeta.StoryList, ',');
                for (int i = 0; i < list.Count; i++)
                {
                    LeaderStoryInfo info = LeaderStoryInfo.InitStoryInfo(list[i]);
                    if (info != null)
                    {
                        result.Add(info);
                    }
                }
            }
            return(result);
        }