Example #1
0
 public static void AddPixelMaskSet(string name, PixelMaskSet pixelMaskSet)
 {
     if (PIXEL_MASK_SETS.ContainsKey(name))
     {
         throw new Exception("PixelMaskSet with name '" + name + "' already exists!");
     }
     PIXEL_MASK_SETS[name] = pixelMaskSet;
 }
Example #2
0
        public GridCollider(int width, int height, int cellWidth, int cellHeight, PixelMaskSet pixelMaskSet = null)
        {
            Width      = width;
            Height     = height;
            CellWidth  = cellWidth;
            CellHeight = cellHeight;
            grid       = new Tile[width * height];

            WidthPx  = width * cellWidth;
            HeightPx = height * cellHeight;

            this.pixelMaskSet = pixelMaskSet;
        }