~saurabhs/bomberman

a211d7d0139fb38200dc15b0dfc34d80e0550a55 — Saurabh S 4 years ago 7388608
Fixed array issue
1 files changed, 3 insertions(+), 3 deletions(-)

M Assets/Scripts/Common/Constants.cs
M Assets/Scripts/Common/Constants.cs => Assets/Scripts/Common/Constants.cs +3 -3
@@ 37,7 37,7 @@ namespace Bomberman
    }

    [System.Serializable]
    public struct TileDataMapper
    public class TileDataMapper
    {
        [SerializeField] public int i;
        [SerializeField] public int j;


@@ 79,13 79,13 @@ namespace Bomberman

        public void SetValue( int i, int j, int value )
        {
            var index = i * width + j;
            var index = i + j * width;
            tiledata[index] = new TileDataMapper( i, j, value );
        }

        public int GetValue( int i, int j )
        {
            var index = i * width + j;
            var index = i + j * width;
            return tiledata[index].value;
        }
    }