コード例 #1
0
ファイル: CatchBeatmap.cs プロジェクト: Someone999/osuTools
        double GetTimePoint(double time, CatchTimePointType timePointType)
        {
            double r = double.NaN;

            try
            {
                foreach (var tmpt in CatchTimePoints[timePointType].Keys)
                {
                    if (tmpt <= time)
                    {
                        r = CatchTimePoints[timePointType][tmpt];
                    }
                    else
                    {
                        break;
                    }
                }
            }
            catch (Exception)
            {
                // ignored
            }

            return(r);
        }
コード例 #2
0
ファイル: CatchBeatmap.cs プロジェクト: Someone999/osuTools
 void AddOrAssign(CatchTimePointType type, double offset, double value)
 {
     if (CatchTimePoints[type].ContainsKey(offset))
     {
         CatchTimePoints[type][offset] = value;
     }
     else
     {
         CatchTimePoints[type].Add(offset, value);
     }
 }