Exemple #1
0
        // Set the fog for a square area of the map. 0 is fully unfogged and 1 if fully fogged.
        public void SetFog(Bounds bounds, byte value)
        {
            Rect rect = new Rect();

            rect.min = FogOfWarConversion.WorldToFog(bounds.min, plane, mapOffset, mapResolution, mapSize);
            rect.max = FogOfWarConversion.WorldToFog(bounds.max, plane, mapOffset, mapResolution, mapSize);
            _drawer.SetFog(rect, value);
        }