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


C# Level.AddGoal方法代码示例

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


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

示例1: Medium

        private void Medium()
        {
            Level level = new Level(0, this);
            level.levelDuration = new TimeSpan(0, 5, 0);
            level.goalFrequency = new TimeSpan(0, 0, 20);
            level.goalRewardTime = new TimeSpan(0, 0, 20);
            level.AddStartGoal(new WordCountGoal(40, 3, level.levelDuration));
            level.AddGoal(new SpecificWordGoal(new StringBuilder("dude"), TimeSpan.Zero));
            level.AddGoal(new WordCountGoal(5, 4, TimeSpan.Zero));
            level.AddGoal(new GoalSubstring(new StringBuilder("hat"), TimeSpan.Zero));
            level.AddGoal(new _1337Goal(25, 3, TimeSpan.Zero));
            if (Shorewood.IsTrial)
            {
                level.AddGoal(new SpecificWordGoal(new StringBuilder("buy"), TimeSpan.Zero));
                level.AddGoal(new WordCountGoal(5, 4, TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("this"), TimeSpan.Zero));
                level.AddGoal(new BackwardsWordCountGoal(3, 4, TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("game"), TimeSpan.Zero));

            }
            else
            {
                level.AddGoal(new SpecificWordGoal(new StringBuilder("you"), TimeSpan.Zero));
                level.AddGoal(new WordCountGoal(5, 4, TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("rock"), TimeSpan.Zero));
            }
            level.AddGoal(new BackwardsWordCountGoal(3, 4, TimeSpan.Zero));
            PredeterminedLevels.Add(level);
        }
开发者ID:Zikomo,项目名称:Leximo,代码行数:29,代码来源:NormalGameplayLevelManager.cs

示例2: Easy

        private void Easy()
        {
            Level level = new Level(0, this);
            level.goalFrequency = new TimeSpan(0, 0, 25);
            level.goalRewardTime = new TimeSpan(0, 0, 20);
            level.levelDuration = new TimeSpan(0, 5, 0);
            level.AddStartGoal(new WordCountGoal(25, 3, level.levelDuration));
            level.AddGoal(new SpecificWordGoal(new StringBuilder("fun"), TimeSpan.Zero));
            level.AddGoal(new BackwardsWordCountGoal(10, 0, TimeSpan.Zero));
            if (Shorewood.IsTrial)
            {

                level.AddGoal(new SpecificWordGoal(new StringBuilder("buy"), TimeSpan.Zero));
                level.AddGoal(new BackwardsWordCountGoal(15, 0, TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("this"), TimeSpan.Zero));
                level.AddGoal(new WordCountGoal(20, 0, TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("game"), TimeSpan.Zero));
            }
            else
            {
                level.AddGoal(new SpecificWordGoal(new StringBuilder("you"), TimeSpan.Zero));
                level.AddGoal(new BackwardsWordCountGoal(15, 0, TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("rock"), TimeSpan.Zero));

            }
            level.AddGoal(new WordCountGoal(2, 4, TimeSpan.Zero));

            PredeterminedLevels.Add(level);
        }
开发者ID:Zikomo,项目名称:Leximo,代码行数:29,代码来源:NormalGameplayLevelManager.cs

示例3: Hard

 private void Hard()
 {
     Level level = new Level(0.25f, this);
     level.levelDuration = new TimeSpan(0, 3, 0);
     level.goalFrequency = new TimeSpan(0, 0, 15);
     level.goalRewardTime = new TimeSpan(0, 0, 15);
     level.AddStartGoal(new PalindromeGoal(1, 3, TimeSpan.Zero));
     level.AddGoal(new _1337Goal(10, 4, TimeSpan.Zero));
     if (Shorewood.IsTrial)
     {
         level.AddGoal(new SpecificWordGoal(new StringBuilder("buy"), TimeSpan.Zero));
         level.AddGoal(new SpecificWordGoal(new StringBuilder("this"), TimeSpan.Zero));
         level.AddGoal(new SpecificWordGoal(new StringBuilder("game"), TimeSpan.Zero));
         level.AddGoal(new SpecificWordGoal(new StringBuilder("please"), TimeSpan.Zero));
     }
     else
     {
         level.AddGoal(new SpecificWordGoal(new StringBuilder("you"), TimeSpan.Zero));
         level.AddGoal(new SpecificWordGoal(new StringBuilder("are"), TimeSpan.Zero));
         level.AddGoal(new SpecificWordGoal(new StringBuilder("cool"), TimeSpan.Zero));
     }
     level.AddGoal(new PalindromeGoal(1, 4, TimeSpan.Zero));
     level.AddGoal(new WordScoreGoal(9000, 1, TimeSpan.Zero));
     level.AddGoal(new GoalSubstring(new StringBuilder("amp"), TimeSpan.Zero));
     level.AddGoal(new GoalSubstring(new StringBuilder("ion"), TimeSpan.Zero));
     PredeterminedLevels.Add(level);
 }
开发者ID:Zikomo,项目名称:Leximo,代码行数:27,代码来源:NormalGameplayLevelManager.cs

示例4: _1337

        //private void LOL()
        //{
        //    Level level = new Level(0f, this);
        //    level.levelDuration = new TimeSpan(0, 2, 30);
        //    level.goalFrequency = new TimeSpan(0, 0, 20);
        //    level.goalRewardTime = new TimeSpan(0, 0, 20);
        //    level.AddStartGoal(new SpecificWordGoal(new StringBuilder("this"), level.levelDuration));
        //    level.AddGoal(new SpecificWordGoal(new StringBuilder("mode"), TimeSpan.Zero));
        //    level.AddGoal(new SpecificWordGoal(new StringBuilder("hurts"), TimeSpan.Zero));
        //    //level.AddStartGoal(new BackwardsWordCountGoal(40, 0, level.levelDuration));
        //    if (Shorewood.IsTrial)
        //    {
        //        level.AddGoal(new SpecificWordGoal(new StringBuilder("buy"), TimeSpan.Zero));
        //        level.AddGoal(new SpecificWordGoal(new StringBuilder("this"), TimeSpan.Zero));
        //        level.AddGoal(new SpecificWordGoal(new StringBuilder("game"), TimeSpan.Zero));
        //    }
        //    else
        //    {
        //        level.AddGoal(new SpecificWordGoal(new StringBuilder("you"), TimeSpan.Zero));
        //        level.AddGoal(new SpecificWordGoal(new StringBuilder("are"), TimeSpan.Zero));
        //        level.AddGoal(new SpecificWordGoal(new StringBuilder("cool"), TimeSpan.Zero));
        //    }
        //    //level.AddGoal(new WordScoreGoal(10000, 1, TimeSpan.Zero));
        //    level.AddGoal(new SpecificWordGoal(new StringBuilder("good"), TimeSpan.Zero));
        //    level.AddGoal(new SpecificWordGoal(new StringBuilder("luck"), TimeSpan.Zero));
        //    //level.AddGoal(new PalindromeGoal(1, 5, TimeSpan.Zero));
        //    //level.AddGoal(new _1337Goal(40, 3, TimeSpan.Zero));
        //    PredeterminedLevels.Add(level);
        //}
        private void _1337()
        {
            Level level = new Level(0.5f, this);
            level.levelDuration = new TimeSpan(0, 3, 0);
            level.goalFrequency = new TimeSpan(0, 0, 10);
            level.goalRewardTime = new TimeSpan(0, 0, 5);
            level.AddStartGoal(new WordCountGoal(30, 4, level.levelDuration));

            if (Shorewood.IsTrial)
            {
                level.AddGoal(new SpecificWordGoal(new StringBuilder("buy"), TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("this"), TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("game"), TimeSpan.Zero));
            }
            else
            {
                level.AddGoal(new SpecificWordGoal(new StringBuilder("you"), TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("are"), TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("very"), TimeSpan.Zero));
                level.AddGoal(new SpecificWordGoal(new StringBuilder("cool"), TimeSpan.Zero));
            }
            level.AddGoal(new SpecificWordGoal(new StringBuilder("game"), TimeSpan.Zero));
            level.AddGoal(new SpecificWordGoal(new StringBuilder("over"), TimeSpan.Zero));
            level.AddGoal(new SpecificWordGoal(new StringBuilder("really"), TimeSpan.Zero));
            level.AddGoal(new SpecificWordGoal(new StringBuilder("soon"), TimeSpan.Zero));
            level.AddGoal(new PalindromeGoal(1, 3, TimeSpan.Zero));
            level.AddGoal(new PalindromeGoal(1, 4, TimeSpan.Zero));
            level.AddGoal(new PalindromeGoal(1, 3, TimeSpan.Zero));
            level.AddGoal(new GoalSubstring(new StringBuilder("ninth"), TimeSpan.Zero));
            level.AddGoal(new GoalSubstring(new StringBuilder("planet"), TimeSpan.Zero));
            level.AddGoal(new GoalSubstring(new StringBuilder("games"), TimeSpan.Zero));
            level.is1337 = true;
            PredeterminedLevels.Add(level);
        }
开发者ID:Zikomo,项目名称:Leximo,代码行数:63,代码来源:NormalGameplayLevelManager.cs


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