Example #1
0
        public Map parse(string path)
        {
            string buffer = null;

            try
            {
                string[] spitedBuffer = null;
                buffer = System.Text.Encoding.UTF8.GetString(parser(path));

                _timeMap = new List<Note>();
                _map = new Map(_timeMap);
                spitedBuffer = buffer.Split('\n');
                spitedBuffer = cleanStringArray(spitedBuffer);
                if (checkLabelExistence(spitedBuffer))
                {
                    foreach (string label in _labels)
                    {
                        string output = getSongInfo(spitedBuffer, label);
                        setSongInfo(label, output);
                    }
                }
            }
            catch (IOException e)
            {
                Console.WriteLine("{0} Exception caught.", e);
                throw e;

            }
            return _map;
        }
Example #2
0
        public bool Read(string songFilePath)
        {
            _currentMap  = _parser.parse(ExhibeatSettings.ResourceFolder + songFilePath);

            //_currentMap = _parser.parse(songFilePath);

            if (_currentMap == null)
                return false;
            _songIndex = _audioManager.open(ExhibeatSettings.ResourceFolder + _currentMap.Path);
            return true;
        }