Exemplo n.º 1
0
        protected override void InitializeCells()
        {
            cells = new Cell[width * height];

            for (int i = 0; i < cells.Length; i++)
            {
                cells[i] = new CellPalette(0, 1, 0);
            }

            RenderCells = cells;
        }
        protected override void InitializeCells()
        {
            Cells = new Cell[Width * Height];

            for (int i = 0; i < Cells.Length; i++)
            {
                Cells[i] = new CellPalette(0, 1, 0);
            }

            RenderCells = (Cell[])Cells.Clone();
            RenderRects = new Rectangle[Cells.Length];
        }
Exemplo n.º 3
0
        public PaletteSurface(int width, int height, Palette palette) : base(width, height)
        {
            this.palette = palette;
            Renderer     = new PaletteSurfaceRenderer()
            {
                palette = palette
            };

            for (int i = 0; i < Cells.Length; i++)
            {
                Cells[i] = RenderCells[i] = new CellPalette(0, 1, 0);
            }
        }