Example #1
0
 public Editor(VoxelManager manager)
 {
     this.manager = manager;
     toCreate = new Voxel(manager, position, TextureManager.getTexture(texture), TextureManager.containsAlpha(texture), TextureManager.isCube(texture));
     light = new Light(position, 10);
     manager.lights.Add(light);
 }
Example #2
0
        public Voxel(VoxelManager manager, Vector3 position, Texture2D texture, bool alpha = false, bool cube = true, bool light = false)
        {
            this.manager = manager;
            this.position = position;
            this.texture = texture;
            this.alpha = alpha;
            this.cube = cube;

            if (light)
            {
                this.light = new Light(position + Vector3.UnitY, 10);
                manager.lights.Add(this.light);
            }

            SetUpVertices();
        }