public ScreenLayerInfo(string name, TileLayer tiles, bool foreground, List<EntityPlacement> entities, List<ScreenLayerKeyframe> keyframes) { this.Name = name; this.Tiles = tiles; this.Foreground = foreground; this.Entities = entities; this.Keyframes = keyframes; }
private ScreenLayerInfo LoadScreenLayer(XElement node, string stagePath, string name, Tileset tileset, int tileStartX, int tileStartY, bool foreground) { var tileFilePath = Path.Combine(stagePath, name + ".scn"); var tileArray = LoadTiles(tileFilePath); var tileLayer = new TileLayer(tileArray, tileset, tileStartX, tileStartY); var entities = new List<EntityPlacement>(); foreach (XElement entity in node.Elements("Entity")) { EntityPlacement info = LoadEntityPlacement(entity); entities.Add(info); } var keyframes = new List<ScreenLayerKeyframe>(); foreach (var keyframeNode in node.Elements("Keyframe")) { var frame = LoadScreenLayerKeyFrame(keyframeNode); keyframes.Add(frame); } return new ScreenLayerInfo(name, tileLayer, foreground, entities, keyframes); }