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


C# DamageType类代码示例

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


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

示例1: Call

 public virtual float Call(Character caster, Character other,
                   DamageType damageType, float value)
 {
     if(caster == null)
         return value;
     return effect(caster, other, damageType, value);
 }
开发者ID:Desocrit,项目名称:BoDCode,代码行数:7,代码来源:Effect.cs

示例2: Weapon

 public Weapon(int mDmg, float dmgV, float mRange, DamageType dt)
 {
     _maxDamage = mDmg;
     _dmgVar = dmgV;
     _maxRange = mRange;
     _dmgType = dt;
 }
开发者ID:SeniorGameMaster,项目名称:sorcerest,代码行数:7,代码来源:Weapon.cs

示例3: Weapon

 public Weapon(int maxDmg, float dmgVar, float maxRange, DamageType dmgType)
 {
     _maxDamage = maxDmg;
     _damageVariance = dmgVar;
     _maxRange = maxRange;
     _dmgType = dmgType;
 }
开发者ID:Nesh108,项目名称:MonoShoot,代码行数:7,代码来源:Weapon.cs

示例4: SetArmorValue

 public void SetArmorValue(DamageType damType, int value)
 {
     if (armorStats.ContainsKey(damType))
         armorStats[damType] = value;
     else
         armorStats.Add(damType, value);
 }
开发者ID:millpond,项目名称:space-station-14,代码行数:7,代码来源:EntityStatsCompS.cs

示例5: GetMinionTarget

        public static Obj_AI_Minion GetMinionTarget(float range, DamageType damagetype, bool isSkillShot = false, bool isAlly = false, bool isMonster = false, float ksdamage = -1)
        {

            var teamtype = EntityManager.UnitTeam.Enemy;
            if (isAlly)
                teamtype = EntityManager.UnitTeam.Ally;
            var miniontype = EntityManager.MinionsAndMonsters.GetLaneMinions(teamtype, Champion.ServerPosition, range).ToArray();
            if (isMonster)
                miniontype = EntityManager.MinionsAndMonsters.GetJungleMonsters(Champion.ServerPosition, range).ToArray();

            // Check list objects
            if (miniontype.Length == 0) return null;

            var target = miniontype
                .OrderByDescending(a => a.HealthPercent)
                .FirstOrDefault(a => a.IsValidTarget(range) && ((isAlly && a.IsAlly) || (!isAlly && a.IsEnemy))
                                     && ((isMonster && a.IsMonster) || (!isMonster && !a.IsMonster))
                                     && !a.IsDead && !a.IsZombie
                                     && TargetStatus(a)
                                     && (!isSkillShot || WillQHitEnemy(a))
                                     && ((ksdamage > -1 && a.Health <= Champion.CalculateDamageOnUnit(a, damagetype, ksdamage)) || ksdamage == -1)
                                     && !Champion.IsRecalling()
                                     && a.Distance(Champion) <= range);
            return target;
        }
开发者ID:Sicryption,项目名称:EloBuddy-Addons,代码行数:25,代码来源:TargetManager.cs

示例6: Weapon

 public Weapon()
 {
     this.id = -1;
     this.name = "Empty Handed";
     this.Equippable = false;
     this.weight = 0;
     this.value = 0;
     this.speed = 0;
     this.speedbonus = 0;
     this.strengthbonus = 0;
     this.hpbonus = 0;
     this.damage = 0;
     this.type = ItemType.Weapon;
     this.damageType = DamageType.Crushing;
     protection = new Dictionary<DamageType, int>();
     foreach (DamageType type in Enum.GetValues(typeof(DamageType)))
     {
         protection[type] = 0;
     }
     bonus = new Dictionary<Stat, int>();
     foreach (Stat stat in Enum.GetValues(typeof(Stat)))
     {
         bonus[stat] = 0;
     }
 }
开发者ID:squimmy,项目名称:SimpleGame,代码行数:25,代码来源:Weapon.cs

示例7: vp_DamageInfo

	/// <summary>
	/// 
	/// </summary>
	public vp_DamageInfo(float damage, Transform source, Transform originalSource, DamageType type = DamageType.Unknown)
	{
		Damage = damage;
		Source = source;
		OriginalSource = originalSource;
		Type = type;
	}
开发者ID:BHD7,项目名称:Ghost_Town_FPS_Zombies,代码行数:10,代码来源:vp_DamageInfo.cs

示例8: Weapon

 public Weapon()
 {
     _maxDamage = 0;
     _dmgVar = 0;
     _maxRange  = 0;
     _dmgType = DamageType.Heavy;
 }
开发者ID:lutfi99,项目名称:hacknslash,代码行数:7,代码来源:Weapon.cs

示例9: DamageInfo

 /// <summary>
 /// Initializes a new instance of the <see cref="PlatformerPro.DamageInfo"/> class.
 /// </summary>
 /// <param name="amount">Amount.</param>
 /// <param name="damageType">Damage type.</param>
 /// <param name="direction">Direction.</param>
 public DamageInfo(int amount, DamageType damageType, Vector2 direction, IMob damageCauser)
 {
     Amount = amount;
     DamageType = damageType;
     Direction = direction;
     DamageCauser = damageCauser;
 }
开发者ID:Connorlc,项目名称:UnityProjects,代码行数:13,代码来源:DamageInfo.cs

示例10: DamageHistoryItem

 public DamageHistoryItem(Entity damager, int amount, DamageType damType)
 {
     Damager = damager;
     Amount = amount;
     DamType = damType;
     When = DateTime.Now;
 }
开发者ID:MSylvia,项目名称:space-station-14,代码行数:7,代码来源:DamageableComponent.cs

示例11: GetCalculatedDamage

        private static float GetCalculatedDamage(Obj_AI_Base target, DamageType type, float rawdamage)
        {
            var damage = 0f;
            damage += target.CalculateDamageOnUnit(target, type, rawdamage);

            return damage;
        }
开发者ID:HeheheM,项目名称:EloBuddy-2,代码行数:7,代码来源:DamageLib.cs

示例12: RangedAttackSkill

 public RangedAttackSkill(int entityId, int level, DamageType damageType, string textureResourceId = "ranged_attack_skill_icon")
     : base(SkillType.RangedAttack, entityId, level, true, false)
 {
     _range = 8f;
     _damageType = damageType;
     _textureResourceId = textureResourceId;
 }
开发者ID:klutch,项目名称:Loderpit,代码行数:7,代码来源:RangedAttackSkill.cs

示例13: Damage

 public Damage(DamageType type, int value, int armorPenetration, int shieldPenetration)
 {
     this.type = type;
     this.value = value;
     this.armorPenetration = armorPenetration;
     this.shieldPenetration = shieldPenetration;
 }
开发者ID:ReaLgressA,项目名称:SpaceImpactDemo,代码行数:7,代码来源:Weapon.cs

示例14: OnDamage

        public override void OnDamage(float damage, DamageType type)
        {
            Debug.DrawText(string.Format("Took {0} points of {1} damage", damage, type), 3, Color.White, 3);

            if(OnDamaged != null)
                OnDamaged(damage, type);
        }
开发者ID:vblanco20-1,项目名称:AngryBoids,代码行数:7,代码来源:TankDamage.cs

示例15: Call

 public override float Call(Character caster, Character other,
                   DamageType damageType, float value)
 {
     var ae = generateEffect(caster, other, damageType, value, duration,
                             repeats, startEffect, endEffect);
     return ae.EffectStart();
 }
开发者ID:Desocrit,项目名称:BoDCode,代码行数:7,代码来源:TimedEffect.cs


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