本文整理汇总了C#中Timer.Pause方法的典型用法代码示例。如果您正苦于以下问题:C# Timer.Pause方法的具体用法?C# Timer.Pause怎么用?C# Timer.Pause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer.Pause方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>
/// 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();
}
示例3: Start
void Start()
{
CheckOffsets();
//But I think you're just mad 'cause you're singleton.
if (!instance) instance = this;
else if (instance != this) Destroy(this);
timer = Timer.instance;
timer.setTimerStartValue(timerStartValue);
timer.Restart ();
timer.Pause();
isStartScreen = true;
score = Score.instance;
screenSize = new Vector2 (Screen.width, Screen.height);
screenSize = Camera.main.ScreenToWorldPoint (screenSize);
FindAudioSources ();
cam = GameObject.Find ("Main Camera").GetComponent<Camera>();
shakeRate = initialShakeRate;
}
示例4: Pause
/// <summary>
/// Pause 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 pause.</param>
public static void Pause(Timer timer)
{
if (timer != null)
{
timer.Pause();
}
}