public SceneCommandInfo Load(XElement node, string basePath) { var info = new SceneFillMoveCommandInfo(); info.Name = node.RequireAttribute("name").Value; info.Duration = node.GetAttribute<int>("duration"); info.X = node.GetAttribute<int>("x"); info.Y = node.GetAttribute<int>("y"); info.Width = node.GetAttribute<int>("width"); info.Height = node.GetAttribute<int>("height"); return info; }
private void FillMoveCommand(SceneFillMoveCommandInfo command) { HandlerFill obj = objects[command.Name] as HandlerFill; if (obj != null) obj.Move(command.X, command.Y, command.Width, command.Height, command.Duration); }
public static SceneFillMoveCommandInfo FromXml(XElement node) { var info = new SceneFillMoveCommandInfo(); info.Name = node.RequireAttribute("name").Value; info.Duration = node.GetInteger("duration"); info.X = node.GetInteger("x"); info.Y = node.GetInteger("y"); info.Width = node.GetInteger("width"); info.Height = node.GetInteger("height"); return info; }