AStarCollisionMap.QuadTree.CollisionTexture.UpdateTexture C# (CSharp) Method

UpdateTexture() private method

Updates the texture of this collisiontexture.
private UpdateTexture ( ) : void
return void
        private void UpdateTexture()
        {
            int[] intData = new int[textureData.Length];
            Texture2D texture = new Texture2D(this.texture.GraphicsDevice, this.texture.Width, this.texture.Height);

            for( int i = 0; i < intData.Length; i++ )
            {
                if (textureData[i]) intData[i] = (int)Color.Black.PackedValue;
                else intData[i] = 0;
            }
            texture.SetData(intData);
            this.texture = texture;
        }