本文整理汇总了C#中Timer.Resume方法的典型用法代码示例。如果您正苦于以下问题:C# Timer.Resume方法的具体用法?C# Timer.Resume怎么用?C# Timer.Resume使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer.Resume方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
/// <summary>
/// Initializes all of the objects and variables needed for this script.
/// </summary>
void Start ()
{
GameObject GameController = GameObject.FindGameObjectWithTag("GameController");
REF = GameObject.FindGameObjectWithTag("Referee").GetComponent<Referee>();
BR = GameController.GetComponent<BallReset>();
GT = GameController.GetComponent<GameTimer>();
BT = GameObject.Find("BreakTimer").GetComponent<BreakTimer>();
ballPossession = ball.GetComponent<Possession>();
ballLocation = ball.GetComponent<ListObjectLocation>();
timer = gameObject.AddComponent<Timer>();
timer.SetLengthOfTimer(TimerFoulTime);
timer.Resume();
DeadBallTimer = gameObject.AddComponent<Timer>();
DeadBallTimer.SetLengthOfTimer(DeadBallTime);
DeadBallTimer.Pause();
}
示例2: Resume
/// <summary>
/// Resume a timer. The main benefit of this over the method on the instance is that you will not get
/// a <see cref="NullReferenceException"/> if the timer is null.
/// </summary>
/// <param name="timer">The timer to resume.</param>
public static void Resume(Timer timer)
{
if (timer != null)
{
timer.Resume();
}
}