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); // ここに来るのは不正なデータのとき } } }
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; // ここに来るのは不正なデータのとき } }