Ejemplo n.º 1
0
		// 1行1行解釈してクラスを作ってく 
		private void Parser(string s) {
			if (Regex.IsMatch(s, "Material ")) {
				s = Regex.Replace(s, "Material ", "");	// マッチさせる前に邪魔なのは消す 
				Match m = Regex.Match(s, "\\w+");
				matList.AddMaterial(sr, m.Value);
			} else if (Regex.IsMatch(s, "Mesh ")) {
				s = Regex.Replace(s, "Mesh ", "");
				Match m = Regex.Match(s, "\\w+");
				Debug.Log(m.Value);
				meshSection = new MeshSection(sr, m.Value);
			}
		}
Ejemplo n.º 2
0
 // 1行1行解釈してクラスを作ってく
 private void Parser(string s)
 {
     if (Regex.IsMatch(s, "Material "))
     {
         s = Regex.Replace(s, "Material ", "");                  // マッチさせる前に邪魔なのは消す
         Match m = Regex.Match(s, "\\w+");
         matList.AddMaterial(sr, m.Value);
     }
     else if (Regex.IsMatch(s, "Mesh "))
     {
         s = Regex.Replace(s, "Mesh ", "");
         Match m = Regex.Match(s, "\\w+");
         Debug.Log(m.Value);
         meshSection = new MeshSection(sr, m.Value);
     }
 }