Example #1
0
 public Note(int id, float pos, float time, float size, NoteStyleType type, int flickdir, NoteResultType resultType = NoteResultType.Unknown)
 {
     this.id       = id;
     this.pos      = pos;
     this.time     = time;
     this.size     = size;
     this.result   = resultType;
     this.type     = type;
     this.flickdir = flickdir;
 }
Example #2
0
 void parse()
 {
     bpm       = node["bpm"].AsFloat;
     notecount = node["notecount"].AsInt;
     for (int i = 0; i < notecount; i++)
     {
         int           id        = node["notes"][i]["id"].AsInt;
         float         pos       = node["notes"][i]["pos"].AsFloat;
         float         time      = node["notes"][i]["time"].AsFloat;
         float         size      = node["notes"][i]["size"].AsFloat;
         int           flickdir  = 0;
         NoteStyleType styleType = (NoteStyleType)System.Enum.Parse(typeof(NoteStyleType), node["notes"][i]["type"].Value, true);
         if (styleType == NoteStyleType.Flick)
         {
             flickdir = 4;
         }
         notes.Add(new Note(id, pos, time, size, styleType, flickdir));
         pendingnotes.Enqueue(notes[notes.Count - 1]);
     }
 }