private void DrawHoldRibbon(RenderContext context, double now, Note startNote, Note endNote) { OnStageStatus s1 = NotesLayerUtils.GetNoteOnStageStatus(startNote, now), s2 = NotesLayerUtils.GetNoteOnStageStatus(endNote, now); if (s1 == s2 && s1 != OnStageStatus.OnStage) { return; } var mesh = new RibbonMesh(context, startNote, endNote, now, ConnectionType.Hold); mesh.Fill(RibbonBrush.Brush); }
protected override void UpdateInternal(GameTime gameTime) { base.UpdateInternal(gameTime); var dict = _statusList; var now = gameTime.Total.TotalSeconds; foreach (var s in dict) { var oldState = s.Value; var newState = NotesLayerUtils.GetNoteOnStageStatus(s.Key, now); if (oldState == newState) { continue; } if (newState == OnStageStatus.Passed && oldState == OnStageStatus.OnStage) { // TODO: Play sound. } dict[s.Key] = newState; } }