public SceneCommandInfo Load(XElement node, string basePath)
        {
            var info = new SceneMoveCommandInfo();
            info.Name = node.RequireAttribute("name").Value;

            info.Duration = node.TryAttribute<int>("duration");

            info.X = node.GetAttribute<int>("x");
            info.Y = node.GetAttribute<int>("y");
            return info;
        }
Example #2
0
 private void MoveCommand(SceneMoveCommandInfo command)
 {
     HandlerSprite obj = objects[command.Name] as HandlerSprite;
     if (obj != null)
     {
         obj.Move(command.X, command.Y, command.Duration);
         obj.Reset();
     }
 }