当前位置: 首页>>代码示例>>C#>>正文


C# Timer.Pause方法代码示例

本文整理汇总了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>();
	}
开发者ID:DrexelGoalBall,项目名称:goalBall,代码行数:14,代码来源:GameTimer.cs

示例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();
	}
开发者ID:DrexelGoalBall,项目名称:goalBall,代码行数:20,代码来源:Fouls.cs

示例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;
    }
开发者ID:GabrielRaposo,项目名称:TurnItProject,代码行数:25,代码来源:GameManager.cs

示例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();
     }
 }
开发者ID:RivelloMultimediaConsulting,项目名称:EntitasCoverShooter,代码行数:12,代码来源:Timer.cs


注:本文中的Timer.Pause方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。