예제 #1
0
        public void GenerateMaterialTest()
        {
            Material  material = factory.GenerateMaterial();
            Texture2D tex      = material.GetTexture("_SwapTex") as Texture2D;

            Assert.IsTrue(EmployeeFactory.hairColors.Keys.Contains <Color32>(tex.GetPixel((int)EmployeeFactory.SwapIndex.hair, 0)));
            Assert.IsTrue(EmployeeFactory.skinColors.Keys.Contains <Color32>(tex.GetPixel((int)EmployeeFactory.SwapIndex.skin, 0)));
            Assert.IsTrue(EmployeeFactory.eyesColors.Keys.Contains <Color32>(tex.GetPixel((int)EmployeeFactory.SwapIndex.eyes, 0)));
            Assert.IsTrue(EmployeeFactory.shirtColors.Keys.Contains <Color32>(tex.GetPixel((int)EmployeeFactory.SwapIndex.shirt, 0)));
            Assert.IsTrue(EmployeeFactory.shoesColors.Keys.Contains <Color32>(tex.GetPixel((int)EmployeeFactory.SwapIndex.shoes, 0)));
            Assert.IsTrue(EmployeeFactory.shortsColors.Keys.Contains <Color32>(tex.GetPixel((int)EmployeeFactory.SwapIndex.shorts, 0)));
        }