コード例 #1
0
 private IEnumerable <Issue> GetStoryHitSoundIssue(Beatmap aBeatmap, StoryHitSound aStoryHitSound, string anOrigin)
 {
     yield return(new Issue(GetTemplate("Storyboarded Hit Sound"), aBeatmap,
                            Timestamp.Get(aStoryHitSound.time),
                            aStoryHitSound.path, aStoryHitSound.volume,
                            anOrigin));
 }
コード例 #2
0
ファイル: CheckHitSounds.cs プロジェクト: Alchyr/MapsetChecks
        /// <summary> Returns issues for every storyboarded hit sound where too much time and/or too many objects were passed since last update. </summary>
        private List <Issue> GetStoryHsIssuesFromUpdates(Beatmap aBeatmap, double aStartTime, double anEndTime, ref int anObjectsPassed, ref double aPrevTime)
        {
            List <Issue> issues = new List <Issue>();

            if (aBeatmap.generalSettings.mode == Beatmap.Mode.Mania)
            {
                while (true)
                {
                    StoryHitSound storyHitSound = aBeatmap.storyHitSounds.FirstOrDefault(
                        aHitsound => aHitsound.time > aStartTime && aHitsound.time < anEndTime);

                    if (storyHitSound == null)
                    {
                        break;
                    }

                    Issue maniaIssue = GetIssueFromUpdate(storyHitSound.time, ref anObjectsPassed, ref aPrevTime, aBeatmap);
                    if (maniaIssue != null)
                    {
                        issues.Add(maniaIssue);
                    }

                    aStartTime = aPrevTime;
                }
            }
            return(issues);
        }