Пример #1
0
        public static bool CanEnter(
            this MapUnit unit,
            MapCell cell)
        {
            // If the cell itself is blocked
            if (cell.isWalkable == false)
            {
                return(false);
            }

            // Otherwise
            switch (unit.size)
            {
            default:
            case UnitSize.small: return(unit.CanEnterSmall(cell));

            case UnitSize.large: return(unit.CanEnterLarge(cell));
            }
        }