Exemplo n.º 1
0
        protected internal static bool IsChunkWrongSize(Vector3Int chunkPosition, int chunkHierarchySize, Vector3Int triggerPosition, out WrongSizeType changeType)
        {
            (int minDistance, int maxDistance) = Chunk.HierarchySize2DistanceRange(chunkHierarchySize);
            bool isTooSmall = IsChunkTooSmall(chunkPosition, chunkHierarchySize, triggerPosition, maxDistance);
            bool isTooLarge = IsChunkTooLarge(chunkPosition, chunkHierarchySize, triggerPosition, minDistance);

            changeType = isTooLarge ? WrongSizeType.TooLarge : WrongSizeType.TooSmall;
            return(isTooSmall || isTooLarge);
        }
Exemplo n.º 2
0
 protected internal static bool IsChunkTooSmall(Vector3Int chunkPosition, int chunkHierarchySize, Vector3Int triggerPosition)
 => IsChunkTooSmall(chunkPosition, chunkHierarchySize, triggerPosition, Chunk.HierarchySize2DistanceRange(chunkHierarchySize).max);