Exemple #1
0
        public static TMXColor GetColorFromProperty(this IPropertyCollection collection, string key)
        {
            if (collection.TryGetValue <string>(key, out PropertyValue value))
            {
                return(TMXColor.FromString(value));
            }

            return(null);
        }
Exemple #2
0
        public static TMXColor SetBackgroundColor(this Map map, TMXColor color)
        {
            map.Properties["@BackgroundColor"] = color.ToString();

            return(null);
        }
Exemple #3
0
 public static void SetColor(this Tile tile, TMXColor color)
 {
     tile.Properties["@Color"] = color.ToString();
 }
Exemple #4
0
 public static void SetColor(this Map map, TMXColor color)
 {
     map.Properties["@Color"] = color.ToString();
 }
Exemple #5
0
 public static void SetColor(this Layer layer, TMXColor color)
 {
     layer.Properties["@Color"] = color.ToString();
 }