Exemplo n.º 1
0
 void GridRestoreAtCursors(Cursors cursors)
 {
     for (int i = 0; i < cursors.Count; i++)
     {
         GridRestore(cursors[i].position);
     }
 }
Exemplo n.º 2
0
        internal Buffer(Chunk chunk, GameObject[] palette, Camera view, Config config)
        {
            this.view      = view;
            this.chunk     = chunk;
            this.palette   = palette;
            this.config    = config;
            undo           = new Undo();
            cursors        = new Cursors(chunk.bounds, chunk.cell_scale);
            deletion_pool  = new List <GameObject>();
            selection      = new GameObject[16];
            prefab_parents = new GameObject[palette.Length];

            saved_view = new View()
            {
                position          = view.transform.position,
                orthographic_size = view.orthographicSize
            };

            cursors.Add((Vector2)view.transform.position - Vector2.one);
        }