/// <summary> /// Create the field with ChapterDefinition /// </summary> /// <param name="chapterDefinition"></param> public GameField(ChapterDefinition chapterDefinition) { this.Width = chapterDefinition.Width; this.Height = chapterDefinition.Height; this.Map = chapterDefinition.Map; this.Shapes = chapterDefinition.ShapeDict; }
private void InitializeChapter(int chapterId) { this.chapterId = chapterId; // Load Field Map chapterDefinition = DefinitionStore.Instance.LoadChapter(chapterId); gameField = new GameField(chapterDefinition); // Load Events EventLoader eventLoader = EventLoaderFactory.GetEventLoader(chapterId, eventManager); eventLoader.LoadEvents(); }