Beispiel #1
0
 protected override void SetUpDamageData(DamageData damageData)
 {
     base.SetUpDamageData(damageData);
     damageData.Direction        = DirectFire;
     damageData.OnHitEnemy      += (e) => OnHitTarget?.Invoke(e);
     damageData.OnHitToDieEnemy += (Enemy enemy) =>
     {
         OnKilledTarget?.Invoke(enemy);
     };
     damageData.AddDamageOrigin(PlayerTakeBuff.GetValue(BuffRegister.TypeBuff.IncreaseDamageByValue));
     damageData.AddDamagePercentOrigin(PlayerTakeBuff.GetValue(BuffRegister.TypeBuff.IncreaseDamageByPercent));
     damageData.AddDamageCritByPercent(PlayerTakeBuff.GetValue(BuffRegister.TypeBuff.IncreaseDamageCritByPercent));
     damageData.AddDecrease(UnityEngine.Random.Range(-1, 2));
     OnSetUpDamageToAttack?.Invoke(damageData);
 }