예제 #1
0
 public void Parse(ref string[] program)
 {
     _DistanceFunction = ParseUtils.GetToken(ref program);
     if (WooScript.IsShader(_DistanceFunction))
     {
         _ShaderMode = true;
     }
     else
     {
         _ShaderMode = false;
     }
 }
예제 #2
0
        public void Parse(ref string[] program)
        {
            string token = ParseUtils.GetToken(ref program);

            if (token.Length > 0)
            {
                _MaterialFunction = token;
                if (!WooScript.IsShader(_MaterialFunction))
                {
                    throw new ParseException("materialfunction call expected a shader, sadly " + _MaterialFunction + " isn't one...");
                }
            }
            else
            {
                _MaterialFunction = "";
            }
        }