public virtual void Load(IDataNode dataNode, IResourceManager resourceManager) { var shaderName = dataNode.ReadParameter("shader"); _shader = resourceManager.GetShader(shaderName); _name = dataNode.ReadParameter("key"); var textureParameters = new Dictionary <string, string>(); dataNode.ReadAllParameters(_vectorParameters, _numericParameters, textureParameters); foreach (var textureParameter in textureParameters) { if (resourceManager.HasTexture(textureParameter.Value)) { _textureParameters.Add(textureParameter.Key, resourceManager.GetTexture(textureParameter.Value)); } } }
public virtual void Load(IDataNode dataNode, IResourceManager resourceManager) { var shaderName = dataNode.ReadParameter("shader"); _shader = resourceManager.GetShader(shaderName); _name = dataNode.ReadParameter("key"); var textureParameters = new Dictionary<string, string>(); dataNode.ReadAllParameters(_vectorParameters, _numericParameters, textureParameters); foreach (var textureParameter in textureParameters) { if(resourceManager.HasTexture(textureParameter.Value)) _textureParameters.Add(textureParameter.Key, resourceManager.GetTexture(textureParameter.Value)); } }