ACR_Quest.RandomDungeon._setAreaCoordinates C# (CSharp) Метод

_setAreaCoordinates() приватный Метод

private _setAreaCoordinates ( RandomDungeonArea toExpand, RandomDungeonArea toAdd, ExitDirection exit ) : void
toExpand RandomDungeonArea
toAdd RandomDungeonArea
exit ExitDirection
Результат void
        private void _setAreaCoordinates(RandomDungeonArea toExpand, RandomDungeonArea toAdd, ExitDirection exit)
        {
            switch (exit)
            {
                case ExitDirection.North:
                    toAdd.X = toExpand.X;
                    toAdd.Y = toExpand.Y + 1;
                    toAdd.Z = toExpand.Z;
                    break;
                case ExitDirection.East:
                    toAdd.X = toExpand.X + 1;
                    toAdd.Y = toExpand.Y;
                    toAdd.Z = toExpand.Z;
                    break;
                case ExitDirection.South:
                    toAdd.X = toExpand.X;
                    toAdd.Y = toExpand.Y - 1;
                    toAdd.Z = toExpand.Z;
                    break;
                case ExitDirection.West:
                    toAdd.X = toExpand.X - 1;
                    toAdd.Y = toExpand.Y;
                    toAdd.Z = toExpand.Z;
                    break;
                case ExitDirection.Up:
                    toAdd.X = toExpand.X;
                    toAdd.Y = toExpand.Y;
                    toAdd.Z = toExpand.Z + 1;
                    break;
                case ExitDirection.Down:
                    toAdd.X = toExpand.X;
                    toAdd.Y = toExpand.Y;
                    toAdd.Z = toExpand.Z - 1;
                    break;
            }
        }