Example #1
0
        public IEnumerable <Item> TileItem(Type type, Point3D start, int w, int h, bool scale, object[] args)
        {
            var z   = start.Z;
            var end = start.Clone2D(w, h);

            var b = new Rectangle2D(
                new Point2D(Math.Min(start.X, end.X), Math.Min(start.Y, end.Y)),
                new Point2D(Math.Max(start.X, end.X), Math.Max(start.Y, end.Y)));

            return
                (b.EnumeratePoints().Select(p => CreateItem(type, p.ToPoint3D(z), scale, args)).Where(i => i != null && !i.Deleted));
        }
Example #2
0
        public IEnumerable <Static> TileStatic(int itemID, Point3D start, int w, int h, bool checkExist)
        {
            var z   = start.Z;
            var end = start.Clone2D(w - 1, h - 1);

            var b = new Rectangle2D(
                new Point2D(Math.Min(start.X, end.X), Math.Min(start.Y, end.Y)),
                new Point2D(Math.Max(start.X, end.X), Math.Max(start.Y, end.Y)));

            return
                (b.EnumeratePoints()
                 .Select(p => CreateStatic(itemID, p.ToPoint3D(z), checkExist))
                 .Where(i => i != null && !i.Deleted));
        }