i have problem with my project. I’m creating a rhythm game and i’m trying to make notes to list in foreach loop but this notes in foreach loop didn’t displays, only there predefined.
Manually adding Note to code works, but in loop not works. I’m tried to add manually Note, specifing location to beatmap manually in parser which is works but I need to this automatically, by song selection, code is below:
internal List<GameplayObject> ProcessBeatmap()
{
List<GameplayObject> result = new List<GameplayObject>();
parser.ParseFile(beatmapFile);
game.Window.Title = $"{parser.Metadata.Artist} - {parser.Metadata.Title} -- Rhythmical";
result.Add(new Note(500, 190, 100)); // this works
foreach (var beatmapObject in parser.BeatmapObjects)
{
result.Add(new Note(beatmapObject.Time, beatmapObject.X, beatmapObject.Position)); // this not works
}
return result;
}
Thanks for help in advance, I don’t know how to handle this