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


C# Conditions类代码示例

本文整理汇总了C#中Conditions的典型用法代码示例。如果您正苦于以下问题:C# Conditions类的具体用法?C# Conditions怎么用?C# Conditions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ConversationReference

    /**
     * Creates a new ConversationReference
     *
     * @param idTarget
     *            the id of the conversation that is referenced
     */
    public ConversationReference(string idTarget)
    {
        this.idTarget = idTarget;

        documentation = null;
        conditions = new Conditions();
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:13,代码来源:ConversationReference.cs

示例2: GetMaxHappiness

 private static int GetMaxHappiness(Stack<string> atTable, List<string> free, Conditions conditions)
 {
     if (free.Count == 1)
     {
         atTable.Push(free.Single());
         var table = new Table(atTable.ToList());
         var totalHappiness = table.CalcTotalHappiness(conditions);
         atTable.Pop();
         return totalHappiness;
     }
     var maxHappiness = 0;
     for (int i = 0; i < free.Count; i++)
     {
         atTable.Push(free[i]);
         free.RemoveAt(i);
         var happiness = GetMaxHappiness(atTable, free, conditions);
         if (happiness > maxHappiness)
         {
             maxHappiness = happiness;
         }
         var person = atTable.Pop();
         free.Insert(i, person);
     }
     return maxHappiness;
 }
开发者ID:navoznov,项目名称:AdventOfCode,代码行数:25,代码来源:Program.cs

示例3: QueryConditionNode

 public QueryConditionNode(QField lvalue, Conditions conditions, QConst rvalue)
     : base()
 {
     _RValue = rvalue;
     _Condition = conditions;
     _LValue = lvalue;
 }
开发者ID:shigasumi,项目名称:NService,代码行数:7,代码来源:QueryConditionNode.cs

示例4: ApplyCondition

 public static double ApplyCondition(double quality, Conditions condition)
 {
     switch(condition)
     {
         case Conditions.Poor:
             {
                 return quality * 0.5;
             }
         case Conditions.Normal:
             {
                 return quality * 1;
             }
         case Conditions.Good:
             {
                 return quality * 1.5;
             }
         case Conditions.Excellent:
             {
                 return quality * 4;
             }
         default:
             {
                 return quality * 1;
             }
     }
 }
开发者ID:lchesley,项目名称:test-simulator,代码行数:26,代码来源:Calculations.cs

示例5: MissionCondition

 public MissionCondition()
 {
     _condition = Conditions.None;
     _checkValue = 0;
     _name = GetName(_condition);
     //_mission = null;
 }
开发者ID:aash,项目名称:GarrisonButler,代码行数:7,代码来源:MissionCondition.cs

示例6: GetCondition

        public static Conditions GetCondition(Random rng, Conditions previousCondition)
        {
            if(previousCondition == Conditions.Excellent)
            {
                return Conditions.Poor;
            }

            if(previousCondition == Conditions.Good || previousCondition == Conditions.Poor)
            {
                return Conditions.Normal;
            }

            int seed = rng.Next(1, 101);

            if(seed > 75)
            {
                if(seed > 98)
                {
                    return Conditions.Excellent;
                }
                else
                {
                    return Conditions.Good;
                }
            }
            else
            {
                return Conditions.Normal;
            }
        }
开发者ID:lchesley,项目名称:test-simulator,代码行数:30,代码来源:Calculations.cs

示例7: ResourcesUni

 /**
  * Creates a new Resources.
  */
 public ResourcesUni()
 {
     assets = new Dictionary<string, string>();
     // add the hash map of asset AllElements with asset
     AllElementsWithAssets.addAsset(assets);
     conditions = new Conditions();
     name = "No name";
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:11,代码来源:ResourcesUni.cs

示例8: Car

        public Car(string name, string details, int price, string type, string maker, int year, Conditions p):base(name, details, price)
        {

            this.Type = type;
            this.Maker = maker;
            this.YearMade = year;
            this.state = p;

        }
开发者ID:bttalic,项目名称:BitcampStudentTest,代码行数:9,代码来源:Car.cs

示例9: Barrier

 /**
  * Creates a new Exit
  *
  * @param x
  *            The horizontal coordinate of the upper left corner of the exit
  * @param y
  *            The vertical coordinate of the upper left corner of the exit
  * @param width
  *            The width of the exit
  * @param height
  *            The height of the exit
  */
 public Barrier(string id, int x, int y, int width, int height)
     : base(id)
 {
     this.x = x;
     this.y = y;
     this.width = width;
     this.height = height;
     conditions = new Conditions();
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:21,代码来源:Barrier.cs

示例10: MapConditions2Json

 public ConditionsJson MapConditions2Json(Conditions json)
 {
     return new ConditionsJson()
     {
         Chop = json.Chop,
         Flatwater = json.Flatwater,
         Waves = json.Waves
     };
 }
开发者ID:Quorning,项目名称:SpotFinder,代码行数:9,代码来源:MapSpot2Json.cs

示例11: TimedAssessmentRule

 /**
  * Default constructor
  *
  * @param id
  *            Id of the rule
  * @param importance
  *            Importance of the rule
  */
 public TimedAssessmentRule(string id, int importance, bool repeatRule)
     : base(id, importance, repeatRule)
 {
     effects = new List<TimedAssessmentEffect>();
     this.endConditions = new Conditions();
     usesEndConditions = true;
     effectIndex = -1;
     elapsedTime = 0;
     isDone = false;
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:18,代码来源:TimedAssessmentRule.cs

示例12: ElementReference

 /**
  * Creates a new ElementReference
  *
  * @param idTarget
  *            the id of the element that is referenced
  * @param x
  *            the horizontal position of the element
  * @param y
  *            the vertical position of the element
  */
 public ElementReference(string idTarget, int x, int y)
 {
     this.idTarget = idTarget;
     this.x = x;
     this.y = y;
     this.scale = 1;
     this.layer = -1;
     documentation = null;
     conditions = new Conditions();
     influenceArea = new InfluenceArea();
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:21,代码来源:ElementReference.cs

示例13: NextScene

    /**
     * Creates a new NextScene
     *
     * @param nextSceneId
     *            the id of the next scene
     */
    public NextScene(string nextSceneId)
    {
        this.nextSceneId = nextSceneId;

        destinyX = int.MinValue;
        destinyY = int.MinValue;
        conditions = new Conditions();
        effects = new Effects();
        postEffects = new Effects();
        transitionType = NextSceneEnumTransitionType.NO_TRANSITION;
        transitionTime = 0;
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:18,代码来源:NextScene.cs

示例14: ParseElement

    public override void ParseElement(XmlElement element)
    {
        XmlNodeList
            names = element.SelectNodes("name"),
            briefs = element.SelectNodes("brief"),
            detaileds = element.SelectNodes("detailed"),
            conditions = element.SelectNodes("condition");

        string tmpArgVal;
        foreach (XmlElement el in names)
        {
            string soundPath = "";

            tmpArgVal = el.GetAttribute("soundPath");
            if (!string.IsNullOrEmpty(tmpArgVal))
            {
                soundPath = tmpArgVal;
            }
            description.setNameSoundPath(soundPath);
            description.setName(el.InnerText);
        }

        foreach (XmlElement el in briefs)
        {
            string soundPath = "";

            tmpArgVal = el.GetAttribute("soundPath");
            if (!string.IsNullOrEmpty(tmpArgVal))
            {
                soundPath = tmpArgVal;
            }
            description.setDescriptionSoundPath(soundPath);
            description.setDescription(el.InnerText);
        }
        foreach (XmlElement el in detaileds)
        {
            string soundPath = "";

            tmpArgVal = el.GetAttribute("soundPath");
            if (!string.IsNullOrEmpty(tmpArgVal))
            {
                soundPath = tmpArgVal;
            }
            description.setDetailedDescriptionSoundPath(soundPath);
            description.setDetailedDescription(el.InnerText);
        }
        foreach (XmlElement el in conditions)
        {
            currentConditions = new Conditions();
            new ConditionSubParser_(currentConditions, chapter).ParseElement(el);
            this.description.setConditions(currentConditions);
        }
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:53,代码来源:DescriptionsSubParser_.cs

示例15: ActiveArea

 /**
  * Creates a new Exit
  *
  * @param rectangular
  *
  * @param x
  *            The horizontal coordinate of the upper left corner of the exit
  * @param y
  *            The vertical coordinate of the upper left corner of the exit
  * @param width
  *            The width of the exit
  * @param height
  *            The height of the exit
  */
 public ActiveArea(string id, bool rectangular, int x, int y, int width, int height)
     : base(id)
 {
     this.rectangular = rectangular;
     this.x = x;
     this.y = y;
     this.width = width;
     this.height = height;
     Vector2s = new List<Vector2>();
     conditions = new Conditions();
     influenceArea = new InfluenceArea();
 }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:26,代码来源:ActiveArea.cs


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