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


C# Timer.SetLengthOfTimer方法代码示例

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

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

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


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