コード例 #1
0
ファイル: Renderer.cs プロジェクト: JeffM2501/HackSharp
            public void Update(Cluster cluster)
            {
                for (int z = 0; z < cluster.Planes.Length; z++)
                {
                    Cluster.Plane plane = cluster.Planes[z];
                    if (plane.Solid != null && plane.Solid.Height == Solidity.Empty)
                        continue; // it's air

                    // see if our plane is hidden
                    for (WorldDirection dir = WorldDirection.North; dir <= WorldDirection.Down; dir++)
                    {
                        Cluster.Plane p = cluster.GetNeighbor(z, WorldDirection.North);
                        if (p == null || !p.SideSolid(DirectionUtils.GetFacingDir(WorldDirection.North)))
                        {
                            PlanesToRender.Add(plane);
                            break;
                        }
                    }
                }
            }