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); }
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; }