コード例 #1
0
 public HeightmapTextureProcessor(IHeightmap heightmap,
                                  ITextureGroupResolver textureGroupResolver,
                                  ITextureGroupTransitionRepository textureGroupTransitionRepository)
 {
     _heightmap                        = heightmap;
     _textureGroupResolver             = textureGroupResolver;
     _textureGroupTransitionRepository = textureGroupTransitionRepository;
     _textures = new Lazy <short[, ]>(InitializeTextures);
 }
コード例 #2
0
 public HeightmapTextureProcessor(IHeightmap heightmap,
     ITextureGroupResolver textureGroupResolver,
     ITextureGroupTransitionRepository textureGroupTransitionRepository)
 {
     _heightmap = heightmap;
     _textureGroupResolver = textureGroupResolver;
     _textureGroupTransitionRepository = textureGroupTransitionRepository;
     _textures = new Lazy<short[,]>(InitializeTextures);
 }
コード例 #3
0
 public HeightmapTextureProcessor(IHeightmapPage heightmapPage,
     ITextureGroupResolver textureGroupResolver,
     ITextureGroupTransitionRepository textureGroupTransitionRepository,
     IRandomGenerator randomGenerator)
 {
     _heightmapPage = heightmapPage;
     _textureGroupResolver = textureGroupResolver;
     _textureGroupTransitionRepository = textureGroupTransitionRepository;
     _randomGenerator = randomGenerator;
     _textures = new Lazy<short[,]>(InitializeTextures);
 }
コード例 #4
0
        private void SetupTextureTransitionGroupRepository()
        {
            var mock = new Mock <ITextureGroupTransitionRepository>();

            var textureGroupTransitions = new List <TextureGroupTransition>
            {
                new TextureGroupTransition
                {
                    LowerGroupName = "Lower",
                    UpperGroupName = "Upper"
                }
            };

            mock.SetupGet(repository => repository.Items)
            .Returns(textureGroupTransitions);

            _textureGroupTransitionRepository = mock.Object;
        }
コード例 #5
0
        private void SetupTextureTransitionGroupRepository()
        {
            var mock = new Mock<ITextureGroupTransitionRepository>();

            var textureGroupTransitions = new List<TextureGroupTransition>
                                              {
                                                  new TextureGroupTransition
                                                      {
                                                          LowerGroupName = "Lower",
                                                          UpperGroupName = "Upper"
                                                      }
                                              };

            mock.SetupGet(repository => repository.Items)
                .Returns(textureGroupTransitions);

            _textureGroupTransitionRepository = mock.Object;
        }