예제 #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);
 }
예제 #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();
        }