public void Load(Project project, XElement node) { var scene = new SceneInfo(); LoadHandlerBase(scene, node, project.BaseDir); scene.Duration = node.GetAttribute<int>("duration"); scene.CanSkip = node.TryAttribute<bool>("canskip"); foreach (var keyNode in node.Elements("Keyframe")) { scene.KeyFrames.Add(LoadKeyFrame(keyNode, project.BaseDir)); } var transferNode = node.Element("Next"); if (transferNode != null) { scene.NextHandler = LoadHandlerTransfer(transferNode); } project.AddScene(scene); }
private Scene(SceneInfo info) { this.info = info; Info = info; _screen = new NullTiledScreen(); }
public void RemoveScene(SceneInfo scene) { _scenes.Remove(scene); }
public void AddScene(SceneInfo scene) { _scenes.Add(scene); }
public static SceneInfo FromXml(XElement node, string basePath) { var info = new SceneInfo(); info.Load(node, basePath); return info; }