Esempio n. 1
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine(String.Format("tile_set: \"{0}\"", TileSet.Trim()));
            foreach (var layer in Layers)
            {
                sb.AppendLine(layer.ToString());
            }
            sb.AppendLine(String.Format("material: \"{0}\"", Material.Trim()));
            sb.AppendLine(String.Format("blend_mode: {0}", BlendMode.Trim()));
            return(sb.ToString());
        }
Esempio n. 2
0
        public List <KeyValuePair <string, object> > Serialize()
        {
            var list = new List <KeyValuePair <string, object> > ();

            foreach (var layer in Layers)
            {
                list.Add(new KeyValuePair <string, object>("layers", layer.Serialize()));
            }

            list.Add(new KeyValuePair <string, object>("tile_set", String.Format("\"{0}\"", TileSet.Trim())));
            list.Add(new KeyValuePair <string, object> ("material", String.Format("\"{0}\"", Material.Trim())));
            list.Add(new KeyValuePair <string, object> ("blend_mode", BlendMode.Trim().ToString()));

            return(list);
        }