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


C# Quality类代码示例

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


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

示例1: ReturnPriceByQuality

 private static int ReturnPriceByQuality(Quality q, int defaultPrice)
 {
     int price;
     switch (q)
     {
         case Quality.Foul:
         case Quality.Horrifying:
         case Quality.Bad:
         case Quality.Putrid:
             price = defaultPrice;
             break;
         case Quality.Nice:
         case Quality.VeryNice:
             price = (int)(defaultPrice * 1.2f);
             break;
         case Quality.Great:
         case Quality.Outstanding:
         case Quality.Excellent:
             price = (int)(defaultPrice * 1.3f);
             break;
         case Quality.Perfect:
             price = (int)(defaultPrice * 1.4f);
             break;
         default:
             price = defaultPrice;
             break;
     }
     return price;
 }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:29,代码来源:ShoppingMethods.cs

示例2: Add

        public void Add(Quality input, ContextMenuStrip strip)
        {
            TreeNode newNode = new TreeNode();
            newNode.Text = input.DisplayName;
            newNode.Tag = input.InternalId;
            newNode.ContextMenuStrip = strip;

            if (input.Notes != string.Empty)
                newNode.ForeColor = Color.SaddleBrown;
            else
            {
                if (input.OriginSource == QualitySource.Metatype || input.OriginSource == QualitySource.MetatypeRemovable)
                    newNode.ForeColor = SystemColors.GrayText;
                if (!input.Implemented)
                    newNode.ForeColor = Color.Red;
            }
            newNode.ToolTipText = CommonFunctions.WordWrap(input.Notes, 100);

            TreeNode nodeToAddTo = this.Nodes[(int)input.Type];
            if (!nodeToAddTo.Nodes.ContainsKey(newNode.Text))
            {
                nodeToAddTo.Nodes.Add(newNode);
                nodeToAddTo.Expand();
            }
        }
开发者ID:rabbitslayer4,项目名称:chummer5a,代码行数:25,代码来源:TreeView.cs

示例3: Blob

	public Blob()
	{
		gm = (GameManager)(GameObject.Find("GameManager")).GetComponent<GameManager>();
		quality = Quality.Standard;
		levelBoostForOffspring = 0f;
		onMission = false;
		birthday = new DateTime(0);
		hasHatched = false;
		hatchTime = new DateTime(0);
		breedReadyTime = new DateTime(0);
		goldProductionTime = new DateTime(0);
		unprocessedGenes = new List<Gene>();
		activeGenes = new List<Gene>();
		inactiveGenes = new List<Gene>();
		bodyPartSprites = new Dictionary<string, Texture>();
		momId = -1;
		dadId = -1;
		spouseId = -1;
		unfertilizedEggs = 99;
		color = new Color(0.863f, 0.863f, 0.863f, 1f);
		blobHatchDelay = gm.blobHatchDelay;
		breedReadyDelay = gm.breedReadyDelay;
		heartbrokenRecoverDelay = gm.heartbrokenRecoverDelay;
		mateFindDelay = gm.mateFindDelay;
		goldProduction = 0;
		sellValue = 1;
		level = 1;
	}
开发者ID:mcdonnellv,项目名称:BlobsPrototype,代码行数:28,代码来源:Blob.cs

示例4: Equipment

	public Equipment (string itemName, string description, ItemType itemType, Quality quality, string spriteNeutral, string spriteHighlighted, int maxSize, int intellect, int agility, int stamina, int strength) 
		: base(itemName,description,itemType,quality,spriteNeutral,spriteHighlighted,maxSize) {
		this.Intellect = intellect;
		this.Agility = agility;
		this.Stamina = stamina;
		this.Strength = strength;
	}	
开发者ID:Fahrettin52,项目名称:Game-Lab-1.1,代码行数:7,代码来源:Equipment.cs

示例5: ActivateFeedback

 public void ActivateFeedback(string feedback, Quality quality)
 {
     gameObject.SetActive(true);
     Feedback.text = feedback;
     setQualityOfLastResponse(quality);
     setFeedbackColor(quality);
 }
开发者ID:imann24,项目名称:peace-superheroes,代码行数:7,代码来源:PhraseFeedback.cs

示例6: equal_operand_false_proper

        public void equal_operand_false_proper()
        {
            var first = new Quality(QualityTypes.Bluray1080p, true);
            var second = new Quality(QualityTypes.Bluray1080p, false);

            (first == second).Should().BeFalse();
        }
开发者ID:ShironDrake,项目名称:NzbDrone,代码行数:7,代码来源:QualityTest.cs

示例7: Point

 public Point()
     : base("New point")
 {
     value = new object();
     timestamp = DateTime.Now;
     quality = Quality.Init;
 }
开发者ID:flipback,项目名称:Galilei,代码行数:7,代码来源:Point.cs

示例8: opEquality_Quality_Quality

        public void opEquality_Quality_Quality()
        {
            var obj = new Quality();
            var comparand = new Quality();

            Assert.True(obj == comparand);
        }
开发者ID:KarlDirck,项目名称:cavity,代码行数:7,代码来源:Quality.Facts.cs

示例9: LandingBay

 /// <summary>
 /// Create a new Landing Bay
 /// </summary>
 /// <param name="name">name of the landing bay</param>
 /// <param name="hulls">class fo ship that can mount this weapon</param>
 /// <param name="slots">locatiosn where this weapon can be mounted</param>
 /// <param name="power">power used by this weapon</param>
 /// <param name="space">space used by this method</param>
 /// <param name="sp">cost of this weapon</param>
 /// <param name="str">strength of the weapon</param>
 /// <param name="capacity">total ammo capacity of the torpedo tube</param>
 /// <param name="origin">rulebook containing this weapon</param>
 /// <param name="page">page this weapon can be found on</param>
 /// <param name="quality">quality of this weapon</param>
 /// <param name="wq">enum declaring which qualities to be adjusted</param>
 /// <param name="special">special rules of this weapon</param>
 public LandingBay(string name, HullType hulls, WeaponSlot slots, int power, int space, int sp, int str,
     RuleBook origin, byte page, Quality quality = Quality.Common, WeaponQuality wq = WeaponQuality.None,
     string special = null, ComponentOrigin comp = ComponentOrigin.Standard, Condition cond = Condition.Intact)
     : base(name, WeaponType.LandingBay, hulls, slots, power, space, sp, str, default(DiceRoll), 0, 0, origin, page, quality, wq, special, Quality.None, comp, cond)
 {
     Squadrons = new List<Squadron>(Strength * 3);
 }
开发者ID:hooperk,项目名称:Starship,代码行数:23,代码来源:LandingBay.cs

示例10: CreateBookWrittenCallback

        public static ObjectGuid CreateBookWrittenCallback(object customData, ref Simulator.ObjectInitParameters initData, Quality quality)
        {
            BookWrittenData data = customData as BookWrittenData;
            if (data == null) return ObjectGuid.InvalidObjectGuid;

            try
            {
                Notify(data.Title);

                BookWritten book = GlobalFunctions.CreateObjectOutOfWorld("BookWritten") as BookWritten;
                if (book == null)
                {
                    return ObjectGuid.InvalidObjectGuid;
                }

                book.InitBookCommon(data);

                return book.ObjectId;
            }
            catch(Exception e)
            {
                Common.Exception(data.ID, e);
                return ObjectGuid.InvalidObjectGuid;
            }
        }
开发者ID:Robobeurre,项目名称:NRaas,代码行数:25,代码来源:WrittenWord.cs

示例11: opImplicit_float_Quality

        public void opImplicit_float_Quality()
        {
            const float expected = 0.75f;
            float actual = new Quality(expected);

            Assert.Equal(expected, actual);
        }
开发者ID:KarlDirck,项目名称:cavity,代码行数:7,代码来源:Quality.Facts.cs

示例12: opImplicit_Quality_string

        public void opImplicit_Quality_string()
        {
            var expected = new Quality(0.234f);
            Quality actual = "0.234";

            Assert.Equal(expected, actual);
        }
开发者ID:KarlDirck,项目名称:cavity,代码行数:7,代码来源:Quality.Facts.cs

示例13: not_equal_operand

        public void not_equal_operand()
        {
            var first = new Quality(QualityTypes.Bluray1080p, true);
            var second = new Quality(QualityTypes.Bluray1080p, true);

            (first != second).Should().BeFalse();
        }
开发者ID:ShironDrake,项目名称:NzbDrone,代码行数:7,代码来源:QualityTest.cs

示例14: CrewSustainer

 /// <summary>
 /// Create a new Crew Quarters or Life Sustainer
 /// </summary>
 /// <param name="name">name of teh life sustainer of crew quarters</param>
 /// <param name="types">classes of ship which can use this component</param>
 /// <param name="power">power used by this component</param>
 /// <param name="space">space used by this component</param>
 /// <param name="morale">morale modifier of this component</param>
 /// <param name="origin">rulebook containing this component</param>
 /// <param name="page">page this component can be found on</param>
 /// <param name="special">special rules for this component</param>
 /// <param name="quality">quality of this component</param>
 /// <param name="sp">cost of this component</param>
 /// <param name="loss">modifier to morale loss granted by this component</param>
 public CrewSustainer(string name, HullType types, int power, int space, int morale, RuleBook origin, byte page,
     string special = null, Quality quality = Quality.Common, int sp = 0, int loss = 0, ComponentOrigin comp = ComponentOrigin.Standard, Condition cond = Condition.Intact)
     : base(name, sp, power, space, special, origin, page, types, quality, comp, cond)
 {
     this.Morale = morale;
     this.MoraleLoss = loss;
 }
开发者ID:hooperk,项目名称:Starship,代码行数:21,代码来源:CrewSustainer.cs

示例15: InvGameItem

 public InvGameItem(int id, InvBaseItem bi)
 {
     this.quality = Quality.Sturdy;
     this.itemLevel = 1;
     this.mBaseItemID = id;
     this.mBaseItem = bi;
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:7,代码来源:InvGameItem.cs


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