public static V2DContentHolder UilToV2DContent(string path, ContentProcessorContext context) { V2DContentHolder result = null; VexObject vo = LoadFromUIL.Load(path); VexTree vt = new VexTree(); vt.Convert(vo, null); vt.WriteToXml(); result = vt.GetV2DContent(context); return(result); }
public static V2DContentHolder SwfToV2DContent(SwfCompilationUnit scu, ContentProcessorContext context) { V2DContentHolder result = null; if (scu.IsValid) { SwfToVex s2v = new SwfToVex(); VexObject vo = s2v.Convert(scu); VexTree vt = new VexTree(); vt.Convert(vo, scu); vt.WriteToXml(); result = vt.GetV2DContent(context); } return result; }
public static V2DContentHolder SwfToV2DContent(SwfCompilationUnit scu, ContentProcessorContext context) { V2DContentHolder result = null; if (scu.IsValid) { SwfToVex s2v = new SwfToVex(); VexObject vo = s2v.Convert(scu); VexTree vt = new VexTree(); vt.Convert(vo, scu); vt.WriteToXml(); result = vt.GetV2DContent(context); } return(result); }
static void Main(string[] args) { Console.WriteLine("Swf to Box2D data files"); Console.WriteLine("Robin Debreuil - 2008"); Console.WriteLine(""); #if !DEBUG if (args.Length < 1) { Console.WriteLine(""); Console.WriteLine("Usage: v2d <filename>"); Console.WriteLine("Usage: v2d <dir> (all files in directory)"); return; } string fileName = args[0]; #else string fileName = (args.Length < 1) ? Directory.GetCurrentDirectory() : args[0]; #endif if (File.Exists(fileName)) { VexTree vt = ProcessFile(fileName); vt.WriteToXml(); } else if (Directory.Exists(fileName)) { string[] swfs = Directory.GetFiles(Path.GetFullPath(fileName), "*.swf"); for (int i = 0; i < swfs.Length; i++) { ProcessFile(swfs[i]); } } else { Console.WriteLine(""); Console.WriteLine("Error: file " + fileName + "doesn't exist."); } }
public static V2DContentHolder UilToV2DContent(string path, ContentProcessorContext context) { V2DContentHolder result = null; VexObject vo = LoadFromUIL.Load(path); VexTree vt = new VexTree(); vt.Convert(vo, null); vt.WriteToXml(); result = vt.GetV2DContent(context); return result; }