Beispiel #1
0
    public SusAnalyzer(string susName)
    {
        TextAsset textAsset = Resources.Load(susName) as TextAsset;
        int       i         = 0;

        foreach (string s in textAsset.text.Split(new string[] { "\n" }, StringSplitOptions.None))
        {
            i++;
            Match m  = metaReg.Match(s);
            Match m2 = scoreReg.Match(s);

            if (s.Length == 0)
            {
                continue;
            }
            if (!s.StartsWith("#"))
            {
                continue;
            }
            else if (m.Success)
            {
                ProcessCommand(m, i);
            }
            else if (m2.Success)
            {
                ProcessData(m2, i);
            }
            else
            {
                Debug.Log("SUS有効行ですが解析できませんでした Line: " + i);
            }
        }

        Debug.Log("META: " + songData.ToString());

        foreach (SusRawNoteData note in notes)
        {
            Debug.Log("NOTE: " + note.ToString());
        }
    }