예제 #1
0
        public static Dictionary <int, Sign> GetAppliedSigns(int X, int Y, int Width, int Height)
        {
            Dictionary <int, Sign> signs = new Dictionary <int, Sign>();
            int X2 = (X + Width), Y2 = (Y + Height);

            for (int i = 0; i < Main.sign.Length; i++)
            {
                Sign sign = Main.sign[i];
                if ((sign != null) && (sign.x >= X) && (sign.x < X2) &&
                    (sign.y >= Y) && (sign.y < Y2))
                {
                    signs.Add(i, sign);
                }
            }

            for (int i = 0; i < Common.Order.Count; i++)
            {
                FakeTileRectangle fake = Common.Data[Common.Order[i]];
                if (fake.Enabled && fake.IsIntersecting(X, Y, Width, Height))
                {
                    fake.ApplySigns(signs, X, Y, Width, Height);
                }
            }

            /*
             * for (int i = 0; i < Personal[Who].Order.Count; i++)
             * {
             *  FakeTileRectangle fake = Personal[Who].Data[Personal[Who].Order[i]];
             *  if (fake.Enabled && fake.IsIntersecting(X, Y, Width, Height))
             *      fake.ApplySigns(signs, X, Y, Width, Height);
             * }
             */
            return(signs);
        }
예제 #2
0
        public static ITile[,] GetAppliedTiles(int X, int Y, int Width, int Height)
        {
            ITile[,] tiles = new ITile[Width, Height];
            int X2 = (X + Width), Y2 = (Y + Height);

            for (int i = X; i < X2; i++)
            {
                for (int j = Y; j < Y2; j++)
                {
                    tiles[i - X, j - Y] = Main.tile[i, j];
                }
            }

            for (int i = 0; i < Common.Order.Count; i++)
            {
                FakeTileRectangle fake = Common.Data[Common.Order[i]];
                if (fake.Enabled && fake.IsIntersecting(X, Y, Width, Height))
                {
                    fake.ApplyTiles(tiles, X, Y);
                }
            }

            /*
             * for (int i = 0; i < Personal[Who].Order.Count; i++)
             * {
             *  FakeTileRectangle fake = Personal[Who].Data[Personal[Who].Order[i]];
             *  if (fake.Enabled && fake.IsIntersecting(X, Y, Width, Height))
             *      fake.ApplyTiles(tiles, X, Y);
             * }
             */
            return(tiles);
        }