Ejemplo n.º 1
0
 public void read(BinaryReader r)
 {
     this.Count            = r.ReadInt32();
     this.PhraseIterations = new PhraseIteration[this.Count]; for (int i = 0; i < this.Count; i++)
     {
         PhraseIteration obj = new PhraseIteration(); obj.read(r); this.PhraseIterations[i] = obj;
     }
 }
Ejemplo n.º 2
0
 public void read(EndianBinaryReader r)
 {
     Count            = r.ReadInt32();
     PhraseIterations = new PhraseIteration[Count]; for (int i = 0; i < Count; i++)
     {
         var obj = new PhraseIteration(); obj.read(r); PhraseIterations[i] = obj;
     }
 }
        private void parsePhraseIterations(Song2014 xml, Sng2014File sng)
        {
            sng.PhraseIterations = new PhraseIterationSection();
            sng.PhraseIterations.Count = xml.PhraseIterations.Length;
            sng.PhraseIterations.PhraseIterations = new PhraseIteration[sng.PhraseIterations.Count];

            for (int i = 0; i < sng.PhraseIterations.Count; i++)
            {
                var piter = xml.PhraseIterations[i];
                var p = new PhraseIteration();
                p.PhraseId = piter.PhraseId;
                p.StartTime = piter.Time;
                if (i + 1 < sng.PhraseIterations.Count)
                    p.NextPhraseTime = xml.PhraseIterations[i + 1].Time;
                else
                    p.NextPhraseTime = xml.SongLength;
                // default to (0, 0, max)
                // they use Medium (previous) value if there is hero=3 missing
                p.Difficulty[2] = xml.Phrases[p.PhraseId].MaxDifficulty;
                if (piter.HeroLevels != null)
                    foreach (var h in piter.HeroLevels)
                        p.Difficulty[h.Hero - 1] = h.Difficulty;
                sng.PhraseIterations.PhraseIterations[i] = p;
            }
        }
 public void read(EndianBinaryReader r)
 {
     Count = r.ReadInt32();
     PhraseIterations = new PhraseIteration[Count]; for (int i = 0; i < Count; i++) { var obj = new PhraseIteration(); obj.read(r); PhraseIterations[i] = obj; }
 }
 public void read(BinaryReader r)
 {
     this.Count = r.ReadInt32();
     this.PhraseIterations = new PhraseIteration[this.Count]; for (int i=0; i<this.Count; i++) { PhraseIteration obj = new PhraseIteration(); obj.read(r); this.PhraseIterations[i] = obj; }
 }