Engines/FlatRedBallXNA/FlatRedBall/AI/LineOfSight/VisibilityGrid.cs
/// <summary>
/// Hides the entire grid (makes it not revealed).
/// </summary>
Hides the entire grid (makes it not revealed).
Hides the entire grid ( makes it not revealed ) .
public void MakeAllHidden()
        {
            Color shadedColor = 
				Color.FromNonPremultiplied(FogColor.R, FogColor.G, FogColor.B, FogShade);
            int y;
            for (int x = 0; x < mNumberOfXTiles; x++)
            {
                for (y = 0; y < mNumberOfYTiles; y++)
                {
                    if (mFogFactor > 0)
                    {
                        for ( int fogX = 0; fogX < mFogFactor; fogX++ )
                        {
                            for ( int fogY = 0; fogY < mFogFactor; fogY++ )
                            {
                                shadedColor = mFogImageData.GetPixelColor(x * mFogFactor + fogX, y * mFogFactor + fogY);
                                if ( shadedColor.R > FogShade )
                                    shadedColor.R = shadedColor.G = shadedColor.B = FogShade;
                                mFogImageData.SetPixel(x * mFogFactor + fogX, y * mFogFactor + fogY, shadedColor);
                            }
                        }
                    }
                    mRevealedTiles[x][y] = 0;
                }
            }
        }
public void MakeAllHidden ( ) { Color shadedColor = Color . FromNonPremultiplied ( FogColor . R , FogColor . G , FogColor . B , FogShade ) ; int y ; for ( int x = 0 ; x < mNumberOfXTiles ; x ++ ) { for ( y = 0 ; y < mNumberOfYTiles ; y ++ ) { if ( mFogFactor > 0 ) { for ( int fogX = 0 ; fogX < mFogFactor ; fogX ++ ) { for ( int fogY = 0 ; fogY < mFogFactor ; fogY ++ ) { shadedColor = mFogImageData . GetPixelColor ( x * mFogFactor + fogX , y * mFogFactor + fogY ) ; if ( shadedColor . R > FogShade ) shadedColor . R = shadedColor . G = shadedColor . B = FogShade ; mFogImageData . SetPixel ( x * mFogFactor + fogX , y * mFogFactor + fogY , shadedColor ) ; } } } mRevealedTiles [ x ] [ y ] = 0 ; } } }
Hides the entire grid (makes it not revealed).
Hides the entire grid ( makes it not revealed ) .