1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System.Collections.Generic;
- namespace GFGGame
- {
- public class StoryCfgManager : SingletonBase<StoryCfgManager>
- {
- private List<StoryChapterCfg> _commonCfgs;
- private List<StoryChapterCfg> _hardCfgs;
- public StoryCfgManager()
- {
- _commonCfgs = new List<StoryChapterCfg>();
- _hardCfgs = new List<StoryChapterCfg>();
- StoryChapterCfg[] dataArray = StoryChapterCfgArray.Instance.dataArray;
- foreach(StoryChapterCfg cfg in dataArray)
- {
- if(StoryUtil.CheckChapterIsHard(cfg.id))
- {
- _hardCfgs.Add(cfg);
- }
- else
- {
- _commonCfgs.Add(cfg);
- }
- }
- }
- public List<StoryChapterCfg> GetDataArray(int storyType)
- {
- if(storyType == ConstStoryType.HARD_TYPE)
- {
- return _hardCfgs;
- }
- else
- {
- return _commonCfgs;
- }
- }
- }
- }
|