Exemplo n.º 1
0
        public GridMesh(IntGrid _grid, float _size)
        {
            grid = _grid;
            size = _size;

            top  = -(grid.height * size) / 2;
            left = -(grid.width * size) / 2;
        }
Exemplo n.º 2
0
        void Start()
        {
            Debug.Log("Bearshirt.Level");

            heroController = hero.GetComponent <HeroController>();
            cameraTargets  = Camera.main.GetComponent <FollowTargets>().targets;

            wallGrid     = new ProceduralGrid();
            wallMesh     = new GridMesh(wallGrid, 1f);
            wallOutlines = new MeshOutlines(wallMesh);

            bkgdGrid = new IntGrid(wallGrid.width, wallGrid.height);
            bkgdMesh = new GridMesh(bkgdGrid, wallMesh.size);

            edgeGrid = new IntGrid(wallGrid.width, wallGrid.height);
            edgeMesh = new GridMesh(edgeGrid, wallMesh.size);

            lavaGrid     = new IntGrid(wallGrid.width, wallGrid.height);
            lavaMesh     = new GridMesh(lavaGrid, wallMesh.size);
            lavaOutlines = new MeshOutlines(lavaMesh);

            GenerateStart();
        }