本文整理汇总了C#中Circle.GetReactionTimeMs方法的典型用法代码示例。如果您正苦于以下问题:C# Circle.GetReactionTimeMs方法的具体用法?C# Circle.GetReactionTimeMs怎么用?C# Circle.GetReactionTimeMs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Circle
的用法示例。
在下文中一共展示了Circle.GetReactionTimeMs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCircleDeactivatedHandler
private static void OnCircleDeactivatedHandler(Circle sender, CircleDeactivatedEventArgs args)
{
GainedScore += args.GainedPoints;
if (Stages.CurrentStage.IsLastLevel()){
temporaryUnavailable.circles.Remove (sender);
} else {
temporaryUnavailable.Push (sender);
}
if (args.GainedPoints < 1 || tapsLeft <= 1)
{
gameOver = true;
foreach (var circle in circles)
{
circle.OnCircleDeactivated -= OnCircleDeactivatedHandler;
circle.SetToWhiteAndDisable();
}
if (tapsLeft <= 1)
{
IsLevelSuccesful = true;
}
if (args.GainedPoints <= 0)
{
IsLevelSuccesful = false;
}
if (args.TappedOutside)
{
DateTime time = DateTime.Now;
var ac = Resources.Load("BuzzerSFX") as AudioClip;
AudioSource.PlayClipAtPoint(ac, Vector3.zero, 0.7f);
self.Background.MakeItRed();
self.StartCoroutine(self.GameOverAfter(1.25f));
self.Background.box.enabled = false;
foreach(var it in circles)
{
it.CircleCol.enabled = false;
}
Debug.Log ("before end of level time_:::" + (DateTime.Now - time).TotalMilliseconds);
}
else
{
DateTime time = DateTime.Now;
tapsLeft--;
self.StartCoroutine(self.GameOverAfter(0.2f));
Debug.Log ("before end of level time_:::" + (DateTime.Now - time).TotalMilliseconds);
}
}
else
{
if ( (Time.time - LastTapTime) < kDoubleTapTreshold)
{
// showing the bonus
LastTapTime = -10;
Bonus.OnDoubletapped(args.GainedPoints);
}
else
{
LastTapTime = Time.time;
clickTimeVec.Add(sender.GetReactionTimeMs());
}
tapsLeft--;
}
bool clear = circles.Where(circle => circle.IsActivated).Count() == 0;
if (clear && !gameOver && Stages.CurrentStage.IsLastLevel())
{
self.StartCoroutine(self.ActivateAllTheCirlesDelayed(0.2f));
}
lastGained = args.GainedPoints;
}