public void setCfg(DialogueConfig cfg, DialogueMgr dMgr) { _infoModelIndex = 0; _isEnded = false; _id = Convert.ToInt32(cfg.id); _models = new List <DialogueInfoModel> (); foreach (object contentId in cfg.content) { int id = Convert.ToInt32(contentId); DialogueInfoModel infoModel = dMgr.getInfoModel(id); _models.Add(infoModel); } }