Engine.Objects.Layer.ReplaceTiles C# (CSharp) Method

ReplaceTiles() public method

Replaces all the tile indices on this layer from 'from' to 'to'.
public ReplaceTiles ( short from, short to ) : void
from short The old index to replace.
to short The new index to replace with.
return void
        public void ReplaceTiles(short from, short to)
        {
            int len = _tiles.Array.Length;
            for (var i = 0; i < len; ++i)
            {
                if (_tiles.Array[i] == from) _tiles.Array[i] = to;
            }
        }