Esempio n. 1
0
        public static HitObject CreateParse(StreamReader stream, SongData song)
        {
            HitObject.Data data = new Data();
            string         line = data.Parse(stream);
            HitObject      ret  = null;

            if (line != null)
            {
                switch (data.Type)
                {
                default:
                case 1:
                    ret = new BeatCircle();
                    break;

                case 2:
                case 6:
                    ret = new Slider();
                    break;

                case 12:
                    ret = new Spinner();
                    break;
                }
                if (ret != null)
                {
                    ret.HitData = data;
                    ret.Parse(stream, line);
                }
            }
            return(ret);
        }
Esempio n. 2
0
 public static HitObject CreateParse(StreamReader stream, SongData song)
 {
     HitObject.Data data = new Data();
     string line = data.Parse(stream);
     HitObject ret = null;
     if (line != null)
     {
         switch (data.Type)
         {
             default:
             case 1:
                 ret = new BeatCircle();
                 break;
             case 2:
             case 6:
                 ret = new Slider();
                 break;
             case 12:
                 ret = new Spinner();
                 break;
         }
         if (ret != null)
         {
             ret.HitData = data;
             ret.Parse(stream, line);
         }
     }
     return ret;
 }