/// <inheritdoc /> public override void Parse(string line, IList <string> tokens, IList <Binding> bindings) { if (tokens.Count < 5) { throw new ExternalCompilerException("TexBind has too few parameters"); } var newBinding = new SetTexture(); newBinding.name = tokens[1]; try { newBinding.id = Int32.Parse(tokens[2]); newBinding.value = Int32.Parse(tokens[3]); newBinding.dimensions = Int32.Parse(tokens[4]); } catch (FormatException) { throw new ExternalCompilerException("TexBind parameter is invalid"); } if (newBinding.dimensions > 0) { bindings.Add(newBinding); } }
/// <inheritdoc /> public override void Parse(string line, IList<string> tokens, IList<Binding> bindings) { if (tokens.Count < 5) throw new ExternalCompilerException("TexBind has too few parameters"); var newBinding = new SetTexture(); newBinding.name = tokens[1]; try { newBinding.id = Int32.Parse(tokens[2]); newBinding.value = Int32.Parse(tokens[3]); newBinding.dimensions = Int32.Parse(tokens[4]); } catch(FormatException) { throw new ExternalCompilerException("TexBind parameter is invalid"); } if(newBinding.dimensions > 0) bindings.Add(newBinding); }