本文整理汇总了C#中Track.Consume方法的典型用法代码示例。如果您正苦于以下问题:C# Track.Consume方法的具体用法?C# Track.Consume怎么用?C# Track.Consume使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Track
的用法示例。
在下文中一共展示了Track.Consume方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NextEvent
//Iterate over all the tracks to find the next event that should be dealt with.
public Event NextEvent()
{
long newTime = 0x7FFFFFFF;
Event ret = new Event ();
Track whichTrack = new Track ();
int trk = 0;
foreach (Track t in MyTracks) {
Event e = t.GetNext ();
if (e.Valid && e.Time < newTime && e.Time >= OldTime ) {
ret = e;
whichTrack = t;
newTime = e.Time;
}
if (!e.Valid) {
valids [trk] = false;
}
if (e.Valid && !valids [trk]) {
Console.WriteLine ("Wow!");
}
++trk;
}
if (ret.Status != 0) {
ret = ret.Copy ();
ret.Delay = ret.Time - OldTime;
OldTime = ret.Time;
} else {
IsFinished = true;
}
whichTrack.Consume ();
return ret;
}