コード例 #1
0
        public void GenerateTextTextureParams()
        {
            var color = new An8MaterialColor();

            color.TextureParams = new An8TextureParams();

            var text = color.GenerateText();

            string expected =
                @"ambiant {
  rgb { 255 255 255 }
  factor { 1.000000 }
  texturename { """" }
  textureparams {
    blendmode { decal }
    alphamode { none }
    percent { 100 }
  }
}
";

            Assert.Equal(
                expected.Replace("\r\n", "\n"),
                text.Replace("\r\n", "\n"));
        }
コード例 #2
0
        public void GenerateTextEmpty()
        {
            var color = new An8MaterialColor();

            var text = color.GenerateText();

            string expected =
                @"ambiant {
  rgb { 255 255 255 }
  factor { 1.000000 }
  texturename { """" }
}
";

            Assert.Equal(
                expected.Replace("\r\n", "\n"),
                text.Replace("\r\n", "\n"));
        }
コード例 #3
0
        public void GenerateTextColor()
        {
            var color = new An8MaterialColor();

            color.Red   = 2;
            color.Green = 3;
            color.Blue  = 4;

            var text = color.GenerateText();

            string expected =
                @"ambiant {
  rgb { 2 3 4 }
  factor { 1.000000 }
  texturename { """" }
}
";

            Assert.Equal(
                expected.Replace("\r\n", "\n"),
                text.Replace("\r\n", "\n"));
        }