public AliasBuilder(string gplText, Func <int, GameObject> goGetter) { this.goGetter = goGetter; List <IEntity> list = new List <IEntity>(); string aliasText = string.Empty; try { aliasText = RegexUtilities.GetTextBetween(gplText, START_ALIAS, END_ALIAS); } catch (Exception e) { throw new NoAliasException(); } using (StringReader reader = new StringReader(aliasText)) { string line = string.Empty; do { line = reader.ReadLine(); if (line != null) { CutsceneEntity entity = BuildEntity(line, this.goGetter); list.Add(entity); } }while (line != null); } if (list.Count == 0) { throw new NoAliasException(); } list.Add(new CameraHome(this.goGetter)); this.Entities = list; }