コード例 #1
0
ファイル: MQOFile.read.cs プロジェクト: t0r0t0r0/MQOplugin
 private bool parseMaterial(TextReader tr)
 {
     while (true)
     {
         string str = tr.ReadLine().Trim();
         Match  m   = MQORegex.Material.Match(str);
         if (m.Success)
         {
             MQOMaterial mat = new MQOMaterial(m.Groups[1].Value);
             if (!mat.parseParams(m.Groups[2].Value))
             {
                 mat.Dispose(); return(false);
             }
             Material.Add(mat);
             continue;
         }
         else if (str.EndsWith("}"))
         {
             return(true);
         }
         else
         {
             return(false); // ここに来るのは不正なデータのとき
         }
     }
 }
コード例 #2
0
ファイル: MQOFile.read.cs プロジェクト: b2ox/MQOplugin
 private bool parseMaterial(TextReader tr)
 {
     while (true)
     {
         string str = tr.ReadLine().Trim();
         Match m = MQORegex.Material.Match(str);
         if (m.Success)
         {
             MQOMaterial mat = new MQOMaterial(m.Groups[1].Value);
             if (!mat.parseParams(m.Groups[2].Value)) { mat.Dispose(); return false; }
             Material.Add(mat);
             continue;
         }
         else if (str.EndsWith("}"))
         {
             return true;
         }
         else return false; // ここに来るのは不正なデータのとき
     }
 }