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


C# Poison类代码示例

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


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

示例1: Constructor_StoresValueType

        public void Constructor_StoresValueType()
        {
            int value = 42;
            var poison = new Poison<int>(value, new ArgumentNullException());

            Assert.Equal(value, poison.Input);
        }
开发者ID:netngn,项目名称:Burden,代码行数:7,代码来源:PoisonTest.cs

示例2: Constructor_StoresException

        public void Constructor_StoresException()
        {
            var exception = new ArgumentNullException("foo");
            var poison = new Poison<int>(42, exception);

            Assert.Equal(new ExceptionDetails(exception), poison.Exception, GenericEqualityComparer<ExceptionDetails>.ByAllMembers());
        }
开发者ID:netngn,项目名称:Burden,代码行数:7,代码来源:PoisonTest.cs

示例3: Constructor_StoresReferenceType

        public void Constructor_StoresReferenceType()
        {
            string value = "test";
            var poison = new Poison<string>(value, new ArgumentNullException());

            Assert.Equal(value, poison.Input);
        }
开发者ID:netngn,项目名称:Burden,代码行数:7,代码来源:PoisonTest.cs

示例4: GetLowerPoison

        /// <summary>
        /// Lowers an applied poison level by one degree at <code>PerkLevel.Second</code>
        /// </summary>
        public Poison GetLowerPoison( Poison p )
        {
            if( Level < PerkLevel.Second )
                return p;

            return Poison.GetPoison(p.Level - 1);
        }
开发者ID:greeduomacro,项目名称:hubroot,代码行数:10,代码来源:Adventurer.cs

示例5: Cast_Spell

 public override void Cast_Spell(Summon s)
 {
     base.Cast_Spell(s);
     if (Random.Range(0, 101) > 90)
     {
         results += new Poison().Do_Ability(s);
     }
 }
开发者ID:Higure27,项目名称:Grimoire,代码行数:8,代码来源:PoisonShield.cs

示例6: Start

    void Start()
    {
        animator = GetComponent<Animator>();
        poisonRef = GetComponentInParent<Poison>();

        areaOfEffect = GetComponent<Collider2D>();
        areaOfEffect.enabled = false;
    }
开发者ID:khinbaptista,项目名称:GameJam2015,代码行数:8,代码来源:SpecialAttack.cs

示例7: Do_Ability

 public SpellResults Do_Ability(Summon s)
 {
     int heal = s.Base_Health / 10 + s.Curse * 5;
     SpellResults r = new SpellResults(0, 0, heal, 0, 0, 0);
     //if (Random.Range(0, 101) > 80)
         r += new Burn().Do_Ability(s);
     //if (Random.Range(0, 101) > 80)
         r += new Poison().Do_Ability(s);
     return r;
 }
开发者ID:Higure27,项目名称:Grimoire,代码行数:10,代码来源:CurseFinisher.cs

示例8: AddNewFoodAndPoison

 public void AddNewFoodAndPoison(int n)
 {
     for (int i = 0; i < n; i++)
     {
         Foods.Add(new Food());
         Foods[i] = new Food();
     }
     for (int i = 0; i < n; i++)
     {
         Poisons.Add(new Poison());
         Poisons[i] = new Poison();
     }
 }
开发者ID:aidded,项目名称:ClassLibary5194,代码行数:13,代码来源:PhysicalLevel.cs

示例9: NewFoodAndPoison

        public void NewFoodAndPoison()
        {
            int PoisonVariable = BetterRandom.PoisonVariable(0.01);
            for (int i = 0; i < PoisonVariable; i++)
            {
                Food tmp = new Food();
                Foods.Add(new Food());
            }

            PoisonVariable = BetterRandom.PoisonVariable(0.015);
            for (int i = 0; i < PoisonVariable; i++)
            {
                Poison tmp = new Poison();
                Poisons.Add(new Poison());
            }
        }
开发者ID:aidded,项目名称:ClassLibary5194,代码行数:16,代码来源:PhysicalLevel.cs

示例10: Assassin

 public Assassin()
 {
     heroTexture = Engine.Engine.GetTexture("Hero/Assassin");
     Hero.loadSprite();
     heroRole = Classes.Assassin;
     baseHealth = 450;
     healthPerLevel = 35;
     requiredBranchLevel = int.MaxValue;
     resetLevel();
     resetHealth();
     abilities[0] = new Mug();
     abilities[1] = new Invisibility();
     abilities[2] = new Parry();
     abilities[3] = new Eviscerate();
     abilities[4] = new Assassinate();
     abilities[5] = new Poison();
     Enemies.Enemy.UpdateTargets(this);
     Enemies.BossEnemy.UpdateBossTargets(this);
 }
开发者ID:JonECG,项目名称:Brogue,代码行数:19,代码来源:Assassin.cs

示例11: Deserialize


//.........这里部分代码省略.........
						{
							m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();

							if (m_DurabilityLevel > WeaponDurabilityLevel.Indestructible)
							{
								m_DurabilityLevel = WeaponDurabilityLevel.Durable;
							}
						}

						if (GetSaveFlag(flags, SaveFlag.Quality))
						{
							m_Quality = (WeaponQuality)reader.ReadInt();
						}
						else
						{
							m_Quality = WeaponQuality.Regular;
						}

						if (GetSaveFlag(flags, SaveFlag.Hits))
						{
							m_Hits = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.MaxHits))
						{
							m_MaxHits = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.Slayer))
						{
							m_Slayer = (SlayerName)reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.Poison))
						{
							m_Poison = Poison.Deserialize(reader);
						}

						if (GetSaveFlag(flags, SaveFlag.PoisonCharges))
						{
							m_PoisonCharges = reader.ReadInt();
						}

						if (GetSaveFlag(flags, SaveFlag.Crafter))
						{
							m_Crafter = reader.ReadMobile();
						}

						if (GetSaveFlag(flags, SaveFlag.Identified))
						{
							m_Identified = (version >= 6 || reader.ReadBool());
						}

						if (GetSaveFlag(flags, SaveFlag.StrReq))
						{
							m_StrReq = reader.ReadInt();
						}
						else
						{
							m_StrReq = -1;
						}

						if (GetSaveFlag(flags, SaveFlag.DexReq))
						{
							m_DexReq = reader.ReadInt();
						}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:67,代码来源:BaseWeapon.cs

示例12: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Poison = Poison.Deserialize( reader );
					break;
				}
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:15,代码来源:GasTrap.cs

示例13: GasTrap

		public GasTrap( GasTrapType type, Poison poison ) : base( GetBaseID( type ) )
		{
			m_Poison = poison;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:4,代码来源:GasTrap.cs

示例14: CheckPoisonImmunity

		public override bool CheckPoisonImmunity( Mobile from, Poison poison )
		{
			if ( base.CheckPoisonImmunity( from, poison ) )
				return true;

			Poison p = this.PoisonImmune;

			return ( p != null && p.Level >= poison.Level );
		}
开发者ID:greeduomacro,项目名称:uotitan,代码行数:9,代码来源:BaseCreature.cs

示例15: ApplyPoison

 public override void ApplyPoison(Poison p, MapObject Caster = null, bool NoResist = false)
 {
 }
开发者ID:ufaith,项目名称:cmirosg,代码行数:3,代码来源:Tree.cs


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