예제 #1
0
        private IDetailParameterEnhancer hack_GetDetail(IGeneratorBuilder builder, IDetailParameterEnhancer detail)
        {
            if (builder.GetType().Name == "CombinerBuilder" && ((CombinerBuilder)builder).BuilderCount != 1)
            {
                // in the current version it uniquely identifies the mountain builder
                return(detail);
            }

            switch (detail.GetType().Name)
            {
            case "LowDetail":
                return(new DetailEnhancer(1, 4, .40f, 2));

            case "MediumDetail":
                return(new DetailEnhancer(1, 5, .45f, 2));

            case "HighDetail":
                return(new DetailEnhancer(1, 6, .50f, 2));

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #2
0
 public INoiseBuilder ApplyDetailLevel(IDetailParameterEnhancer enhancer)
 {
     enhancer.Enhance(_descriptor);
     return(this);
 }