예제 #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);
        }
예제 #2
0
        public static TMXColor SetBackgroundColor(this Map map, TMXColor color)
        {
            map.Properties["@BackgroundColor"] = color.ToString();

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