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


C# Token.getAct方法代码示例

本文整理汇总了C#中Token.getAct方法的典型用法代码示例。如果您正苦于以下问题:C# Token.getAct方法的具体用法?C# Token.getAct怎么用?C# Token.getAct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Token的用法示例。


在下文中一共展示了Token.getAct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TurnList

    public TurnList(Token theToken)
    {
        int period = GameControllerScript.ENDTIME / theToken.getAct();
        int nextTime = period;
        for (int loopTime = GameControllerScript.time; nextTime <= GameControllerScript.ENDTIME;) //Note: This doesn't check for bottom bound. We'd need to retweak it later.
        {
            Turn tempTurn = new Turn(theToken, nextTime);
            this.AddTurn(tempTurn);
            nextTime += period;
        }

        //Initializing the listener.
        Token.MakeNewTurns += AddTurnsOfToken; //Each TurnList that gets made will listen out for the thingy.
        //Though this is supposed to be a Singleton. Should add preventative measures to prevent making more than one.
    }
开发者ID:Retl,项目名称:SuperBunnyBusterIITurboBounceCarrotEdition,代码行数:15,代码来源:TurnList.cs

示例2: AddTurnsOfToken

    public void AddTurnsOfToken(Token theToken)
    {
        /* DELETE THIS BIG BLOCK COMMENT
        this.AddTurn(nickname = theToken.getName());
        //This version of a term gives an incorrect turn, but will work for now.
        float period = GameControllerScript.ENDTIME / myToken.getAct(); //How long it takes for this to get one action. 1000/1= 1000. Which would get it exactly one turn at the end of the day.
        //1000/10 = 100. Fill the time bar with this and they would get 10 turns.

        time = (int)period; //In this case, we're just assuming the earliest possible turn the ACT can give is the only one we're going to make use of.
        END OF DELETEME*/

        int period = GameControllerScript.ENDTIME / theToken.getAct();
        int nextTime = period;
        for (int loopTime = GameControllerScript.time; nextTime <= GameControllerScript.ENDTIME;) //Note: This doesn't check for bottom bound. We'd need to retweak it later.
        {
            Turn tempTurn = new Turn(theToken, nextTime);
            this.AddTurn(tempTurn);
            nextTime += period;
        }
    }
开发者ID:Retl,项目名称:SuperBunnyBusterIITurboBounceCarrotEdition,代码行数:20,代码来源:TurnList.cs


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