コード例 #1
0
 public Debuff(float duration, int procChance, Enemy target, GameManager.typeOfDamage debuffType)
 {
     this.duration   = duration;
     this.procChance = procChance;
     this.target     = target;
     type            = debuffType;
 }
コード例 #2
0
ファイル: Enemy.cs プロジェクト: 17madjoker/TowerDefense2D
    public void TakeDamage(float damage, GameManager.typeOfDamage projectileDamageType)
    {
        if (enemyStats.DamageResistance == projectileDamageType)
        {
            damage *= 0.8f;
        }

        CalculateDamage(damage);
    }
コード例 #3
0
 public BulletDebuff(float multiplier, float duration, int procChance, Enemy target, GameManager.typeOfDamage debuffType) : base(duration, procChance, target, debuffType)
 {
     multiplierShieldRecovery = multiplier;
     defaultRecoveryTime      = target.GetTimeToShieldRecovery();
 }
コード例 #4
0
    // stun for duration time

    public CanonDebuff(float duration, int procChance, Enemy target, GameManager.typeOfDamage debuffType) : base(duration, procChance, target, debuffType)
    {
    }
コード例 #5
0
 public RocketDebuff(float duration, int procChance, float damagePerSecond, Enemy target, GameManager.typeOfDamage debuffType) : base(duration, procChance, target, debuffType)
 {
     this.damagePerSecond = damagePerSecond;
 }