public void Write(LispWriter writer) { writer.StartList("background"); writer.Write("image", this.image); writer.Write("speed", this.speed); writer.EndList("background"); }
public void Write(LispWriter writer) { writer.StartList("tilegroup"); writer.Write("name", Name); writer.Write("tiles", Tiles); writer.EndList("tilegroup"); }
public void Write(LispWriter writer) { writer.StartList("node"); writer.Write("x", x); writer.Write("y", y); writer.Write("time", time); writer.EndList("node"); }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); if (x != -1) { writer.Write("x", this.x); } if (y != -1) { writer.Write("y", this.y); } }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); if (stayonplatform) { writer.Write("stay-on-platform", this.stayonplatform); } }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); writer.Write("name", this.name); foreach (PathNode pn in pathNodes) { pn.Write(writer); } }
public void Write(LispWriter writer) { writer.StartList("sector"); writer.Write("name", this.name); writer.Write("music", this.music); writer.Write("gravity", this.gravity); foreach (Tilemap tilemap in this.tilemaps) { tilemap.Write(writer); } background.Write(writer); writer.StartList("camera"); writer.Write("mode", "normal"); writer.EndList("camera"); foreach (GameObject gameObject in this.gameObjects) { gameObject.Write(writer); } writer.EndList("sector"); }
public void Write(string filename) { FileStream fs = new FileStream(filename, FileMode.Create); TextWriter tw = new StreamWriter(fs); LispWriter writer = new LispWriter(tw); writer.WriteComment("Created with Cobble"); writer.StartList("supertux-level"); writer.Write("version", this.version); writer.StartList("name"); writer.Write("_", this.name); writer.EndList("name"); writer.Write("author", this.author); foreach (Sector sector in this.sectors) { sector.Write(writer); } writer.EndList("supertux-level"); tw.Close(); fs.Close(); }
public void Write(LispWriter writer) { writer.StartList("tilemap"); writer.Write("layer", this.layer); writer.Write("solid", this.solid); writer.Write("speed", this.speed); writer.Write("width", this.width); writer.Write("height", this.height); writer.Write("tiles", this.tiles); writer.EndList("tilemap"); }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); writer.Write("name", this.name); }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); writer.Write("sprite", this.sprite); writer.Write("script", this.script); }
public void Write(LispWriter writer) { writer.StartList("tile"); writer.Write("id", ID); if(Images.Count > 0) { writer.StartList("images"); foreach(ImageRegion region in Images) { if(region.Region.Width != 0) { writer.WriteVerbatimLine( String.Format("(region \"{0}\" {1} {2} {3} {4})", region.ImageFile, region.Region.Left, region.Region.Top, region.Region.Width, region.Region.Height)); } else { writer.WriteVerbatimLine( "\"" + region.ImageFile + "\""); } } writer.EndList("images"); } else { Console.WriteLine("no images on tile " + ID); } if(Solid) writer.Write("solid", true); if(UniSolid) writer.Write("unisolid", true); if(Ice) writer.Write("ice", true); if(Water) writer.Write("water", true); if(Slope) writer.Write("slope-type", Data); if(Hurts) writer.Write("hurts", true); if(Hidden) writer.Write("hidden", true); if(Coin) writer.Write("coin", true); if(FullBox) writer.Write("fullbox", true); if(Brick) writer.Write("brick", true); if(NextTile >= 0) writer.Write("next-tile", NextTile); if(Goal) writer.Write("goal", true); if(EditorImage != null) writer.Write("editor-images", EditorImage); if(Data != 0) writer.Write("data", Data); if(Images.Count > 1) { if(AnimFps == 1.0) AnimFps = 40; writer.Write("anim-fps", AnimFps); } writer.EndList("tile"); }
public void Write(LispWriter writer) { writer.StartList("tile"); writer.Write("id", ID); WriteTileImages(writer, "images", Images); if (HasAttribute(Attribute.SOLID)) { writer.Write("solid", true); } if (HasAttribute(Attribute.UNISOLID)) { writer.Write("unisolid", true); } if (HasAttribute(Attribute.ICE)) { writer.Write("ice", true); } if (HasAttribute(Attribute.WATER)) { writer.Write("water", true); } if (HasAttribute(Attribute.SLOPE)) { writer.Write("slope-type", Data); } if (HasAttribute(Attribute.HURTS)) { writer.Write("hurts", true); } if (HasAttribute(Attribute.FIRE)) { writer.Write("fire", true); } if (HasAttribute(Attribute.COIN)) { writer.Write("coin", true); } if (HasAttribute(Attribute.FULLBOX)) { writer.Write("fullbox", true); } if (HasAttribute(Attribute.BRICK)) { writer.Write("brick", true); } if (HasAttribute(Attribute.GOAL)) { writer.Write("goal", true); } if (Hidden) { writer.Write("hidden", true); } if (NextTile >= 0) { writer.Write("next-tile", NextTile); } if (EditorImages != null) { WriteTileImages(writer, "editor-images", EditorImages); } if (Data != 0) { writer.Write("data", Data); } if (Images.Count > 1) { if (AnimFps == 1.0) { AnimFps = 40; } writer.Write("anim-fps", AnimFps); } if (!String.IsNullOrEmpty(OneWayString)) { writer.Write("one-way", OneWayString); } writer.EndList("tile"); }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); if (x != -1) writer.Write("x", this.x); if (y != -1) writer.Write("y", this.y); }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); if (stayonplatform) writer.Write("stay-on-platform", this.stayonplatform); }
protected override void WriteProperties(LispWriter writer) { base.WriteProperties(writer); writer.Write("name", this.name); foreach (PathNode pn in pathNodes) pn.Write(writer); }
public void Write(LispWriter writer) { writer.StartList("tile"); writer.Write("id", ID); if (Images.Count > 0) { writer.StartList("images"); foreach (ImageRegion region in Images) { if (region.Region.Width != 0) { writer.WriteVerbatimLine( String.Format("(region \"{0}\" {1} {2} {3} {4})", region.ImageFile, region.Region.Left, region.Region.Top, region.Region.Width, region.Region.Height)); } else { writer.WriteVerbatimLine( "\"" + region.ImageFile + "\""); } } writer.EndList("images"); } else { Console.WriteLine("no images on tile " + ID); } if (Solid) { writer.Write("solid", true); } if (UniSolid) { writer.Write("unisolid", true); } if (Ice) { writer.Write("ice", true); } if (Water) { writer.Write("water", true); } if (Slope) { writer.Write("slope-type", Data); } if (Hurts) { writer.Write("hurts", true); } if (Hidden) { writer.Write("hidden", true); } if (Coin) { writer.Write("coin", true); } if (FullBox) { writer.Write("fullbox", true); } if (Brick) { writer.Write("brick", true); } if (NextTile >= 0) { writer.Write("next-tile", NextTile); } if (Goal) { writer.Write("goal", true); } if (EditorImage != null) { writer.Write("editor-images", EditorImage); } if (Data != 0) { writer.Write("data", Data); } if (Images.Count > 1) { if (AnimFps == 1.0) { AnimFps = 40; } writer.Write("anim-fps", AnimFps); } writer.EndList("tile"); }
public void Write(LispWriter writer) { writer.StartList("tile"); writer.Write("id", ID); WriteTileImages(writer, "images", Images); if(HasAttribute(Attribute.SOLID)) writer.Write("solid", true); if(HasAttribute(Attribute.UNISOLID)) writer.Write("unisolid", true); if(HasAttribute(Attribute.ICE)) writer.Write("ice", true); if(HasAttribute(Attribute.WATER)) writer.Write("water", true); if(HasAttribute(Attribute.SLOPE)) writer.Write("slope-type", Data); if(HasAttribute(Attribute.HURTS)) writer.Write("hurts", true); if(HasAttribute(Attribute.FIRE)) writer.Write("fire", true); if(HasAttribute(Attribute.COIN)) writer.Write("coin", true); if(HasAttribute(Attribute.FULLBOX)) writer.Write("fullbox", true); if(HasAttribute(Attribute.BRICK)) writer.Write("brick", true); if(HasAttribute(Attribute.GOAL)) writer.Write("goal", true); if(Hidden) writer.Write("hidden", true); if(NextTile >= 0) writer.Write("next-tile", NextTile); if(EditorImages != null) WriteTileImages(writer, "editor-images", EditorImages); if(Data != 0) writer.Write("data", Data); if(Images.Count > 1) { if(AnimFps == 1.0) AnimFps = 40; writer.Write("anim-fps", AnimFps); } if(!String.IsNullOrEmpty(OneWayString)) { writer.Write("one-way", OneWayString); } writer.EndList("tile"); }