Here are the examples of the csharp api System.Collections.Generic.List.Add(sHuntingHornSong) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
View Source File : HuntingHorn.cs
License : MIT License
Project Creator : Haato3o
License : MIT License
Project Creator : Haato3o
private sHuntingHornSong[] FindSongCandidates()
{
List<sHuntingHornSong> candidates = new List<sHuntingHornSong>();
if (NotesQueued == 0 || NotesQueued == -1 || FirstNoteIndex == -1)
{
return candidates.ToArray();
}
foreach (sHuntingHornSong song in Songs)
{
bool matches = false;
// Now we look for notes that have the same starting notes
for (long i = song.NotesLength - 1; i > 0; i--)
{
if (song.Id < 0 || NotesQueued < song.NotesLength - 1)
{
continue;
}
if (song.Notes[i - 1] == Notes[(NotesQueued - song.NotesLength) + i])
{
matches = true;
} else
{
matches = false;
break;
}
}
if (matches)
{
candidates.Add(song);
}
}
return candidates.ToArray();
}