本文整理汇总了C#中Score.HasRecordReached方法的典型用法代码示例。如果您正苦于以下问题:C# Score.HasRecordReached方法的具体用法?C# Score.HasRecordReached怎么用?C# Score.HasRecordReached使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Score
的用法示例。
在下文中一共展示了Score.HasRecordReached方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onScoreRecordChanged
/// <summary>
/// Opens this <c>Gate</c> if the score-record-changed event causes the <c>Gate</c>'s criteria to be met.
/// </summary>
/// <param name="score">The <c>Score</c> whose record has changed.</param>
public void onScoreRecordChanged(Score score) {
if (score.ID == AssociatedScoreId &&
score.HasRecordReached(DesiredRecord)) {
// If the score's record is reached mutiple times, don't worry about this function
// being called over and over again - that won't happen because `ForceOpen(true)`
// calls`unregisterEvents` inside.
ForceOpen(true);
}
}