Beispiel #1
0
        public bool WillUnground(Voxel voxel)
        {
            foreach (var v in voxel.Adjacent.Where(x => x.Filled))
            {
                // find path from v to ground
                var newTrunks = AstarGroundFinder.CanReachGround(v, voxel, this);
                if (newTrunks == null)
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #2
0
        public void bleh()
        {
            var system = new MatterSystem(20, null, null);

            for (int x = 1; x < 20; x++)
            {
                for (int y = 0; y < 20; y++)
                {
                    for (int z = 1; z < 20; z++)
                    {
                        system.Matrix.Get(x, y, z).Filled = true;
                    }
                }
            }

            system.Matrix.Get(10, 0, 10).Filled = false;

            AstarGroundFinder.CanReachGround(system.Matrix.Get(10, 10, 10), null, system.Matrix);
        }