OurSonic.Level.HeightMap.SetItem C# (CSharp) Method

SetItem() public method

public SetItem ( int x, int y, RotationMode rotationMode ) : void
x int
y int
rotationMode RotationMode
return void
        public void SetItem(int x, int y, RotationMode rotationMode)
        {
            var jx = 0;
            var jy = 0;
            switch (rotationMode) {
                case RotationMode.Floor:
                    jx = x;
                    jy = y;
                    break;
                case RotationMode.LeftWall:
                    jx = y;
                    jy = 15 - x;
                    break;
                case RotationMode.Ceiling:
                    jx = x;
                    jy = 15 - y;
                    break;
                case RotationMode.RightWall:
                    jx = y;
                    jy = x;
                    break;
            }
            Items[jx] = 16 - jy;
        }