本文整理汇总了C#中Timer.SetLengthOfTimer方法的典型用法代码示例。如果您正苦于以下问题:C# Timer.SetLengthOfTimer方法的具体用法?C# Timer.SetLengthOfTimer怎么用?C# Timer.SetLengthOfTimer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer.SetLengthOfTimer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
/// <summary>
/// Initialize all variables needed for this script to run.
/// </summary>
void Start ()
{
timer = GetComponent<Timer>();
timer.SetLengthOfTimer(halfLength + 1);
timer.Pause();
referee = GameObject.FindGameObjectWithTag("Referee").GetComponent<Referee>();
GameObject gameController = GameObject.FindGameObjectWithTag("GameController");
scoreKeeper = gameController.GetComponent<ScoreKeeper>();
ballReset = gameController.GetComponent<BallReset>();
breakTimer = GameObject.Find("BreakTimer").GetComponent<BreakTimer>();
}
示例2: Start
/// <summary>
/// Retrieve the necessary object and script references
/// </summary>
void Start()
{
GameObject gameController = GameObject.FindGameObjectWithTag("GameController");
gameTimer = gameController.GetComponent<GameTimer>();
scoreKeeper = gameController.GetComponent<ScoreKeeper>();
referee = GameObject.FindGameObjectWithTag("Referee").GetComponent<Referee>();
breakTimer = GameObject.Find("BreakTimer").GetComponent<BreakTimer>();
timer = gameObject.GetComponent<Timer>();
timer.SetLengthOfTimer(announcementPauseLength);
}
示例3: 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();
}