示例#1
0
 public TextureSetMaterialData(ConfigNode node)
 {
     shader         = node.GetStringValue("shader");
     meshNames      = node.GetStringValues("mesh");
     excludedMeshes = node.GetStringValues("excludeMesh");
     props          = ShaderProperty.parse(node);
 }
示例#2
0
        public readonly string mode;//ghetto enum - 'update' or 'create' are the only valid values

        public TextureSetMaterialData(ConfigNode node)
        {
            shader           = node.GetStringValue("shader");
            meshNames        = node.GetStringValues("mesh");
            excludedMeshes   = node.GetStringValues("excludeMesh");
            shaderProperties = ShaderProperty.parse(node);
            inheritedTex     = node.GetStringValues("inheritTexture");
            inheritedFloat   = node.GetStringValues("inheritFloat");
            inheritedColor   = node.GetStringValues("inheritColor");
            mode             = node.GetStringValue("mode", "update");
        }
示例#3
0
        public readonly string mode;//ghetto enum - 'update' or 'create' are the only valid values

        public TextureSetMaterialData(TextureSet owner, ConfigNode node, string defaultMode)
        {
            this.owner       = owner;
            shader           = node.GetStringValue("shader");
            meshNames        = node.GetStringValues("mesh");
            excludedMeshes   = node.GetStringValues("excludeMesh");
            shaderProperties = ShaderProperty.parse(node);
            inheritedTex     = node.GetStringValues("inheritTexture");
            inheritedFloat   = node.GetStringValues("inheritFloat");
            inheritedColor   = node.GetStringValues("inheritColor");
            if (!node.HasValue("mode"))
            {
                Log.error("TextureSet: " + owner.name + " did not have definition for mode (create/update).  Using default value of: " + defaultMode + ".  This may not function as desired, and may need to be corrected in the configuration file.");
            }
            mode          = node.GetStringValue("mode", defaultMode);
            renderQueue   = node.GetIntValue("renderQueue", (TexturesUnlimitedLoader.isTransparentShader(shader)? (int)RenderQueue.Transparent : (int)RenderQueue.Geometry));
            textureScale  = node.GetVector2("textureScale", Vector2.one);
            textureOffset = node.GetVector2("textureOffset", Vector2.zero);
        }