• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Quality类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Icomparer_lesser_proper

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

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


示例17: Icomparer_greater_proper

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

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


示例18: Initialize

  /// Initializes the audio system with the current audio configuration.
  /// @note This should only be called from the main Unity thread.
  public static void Initialize (CardboardAudioListener listener, Quality quality) {
    if (!initialized) {
      // Initialize the audio system.
#if UNITY_4_5 || UNITY_4_6 || UNITY_4_7
      sampleRate = AudioSettings.outputSampleRate;
      numChannels = (int)AudioSettings.speakerMode;
      int numBuffers = -1;
      AudioSettings.GetDSPBufferSize(out framesPerBuffer, out numBuffers);
#else
      AudioConfiguration config = AudioSettings.GetConfiguration();
      sampleRate = config.sampleRate;
      numChannels = (int)config.speakerMode;
      framesPerBuffer = config.dspBufferSize;
#endif
      if (numChannels != (int)AudioSpeakerMode.Stereo) {
        Debug.LogError("Only 'Stereo' speaker mode is supported by Cardboard.");
        return;
      }
      Initialize(quality, sampleRate, numChannels, framesPerBuffer);
      listenerTransform = listener.transform;
      initialized = true;

      Debug.Log("Cardboard audio system is initialized (Quality: " + quality + ", Sample Rate: " +
                sampleRate + ", Channels: " + numChannels + ", Frames Per Buffer: " +
                framesPerBuffer + ").");
    } else if (listener.transform != listenerTransform) {
      Debug.LogError("Only one CardboardAudioListener component is allowed in the scene.");
      CardboardAudioListener.Destroy(listener);
    }
  }
开发者ID:CaptainStouf,项目名称:TheKinectAwakens,代码行数:32,代码来源:CardboardAudio.cs


示例19: opImplicit_Quality_float

        public void opImplicit_Quality_float()
        {
            var expected = new Quality(0.62f);
            Quality actual = 0.62f;

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


示例20: Weapon

 /// <summary>
 /// Create a new weapon
 /// </summary>
 /// <param name="name">name of the weapon</param>
 /// <param name="type">class of weapon</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="damage">damage of the weapon</param>
 /// <param name="crit">crit rating of the weapon</param>
 /// <param name="range">range of the weapon</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>
 /// <param name="turbo">Quality of turboweapon battery upgrade if applicable</param>
 public Weapon(string name, WeaponType type, HullType hulls, WeaponSlot slots, int power, int space, 
     int sp, int str, string damage, int crit, int range, RuleBook origin, byte page, Quality quality = Quality.Common,
     WeaponQuality wq = WeaponQuality.None, string special = null, Quality turbo = Quality.None, ComponentOrigin comp = ComponentOrigin.Standard, Condition cond = Condition.Intact)
     : this(name, type, hulls, slots, power, space, sp, str, new DiceRoll(damage), crit, range, 
     origin, page, quality, wq, special, turbo, comp, cond)
 {
 }
开发者ID:hooperk,项目名称:Starship,代码行数:27,代码来源:Weapon.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Quat类代码示例发布时间:2022-05-24
下一篇:
C# QualifiedType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap