protected override void Hit(Unit hitUnit, Collider other) { base.Hit(hitUnit, other); if (hitUnit != null) { //유닛끼리 서로 다른 진영일경우, 대미지를 준다 if (hitUnit.unitSide != this.owner.unitSide) { hitUnit.DealDamage(this.owner, Mathf.RoundToInt(Calculator.RandomDamage(damage))); } } }
protected override void Hit(Unit hitUnit, Collider other) { base.Hit(hitUnit, other); if (hitUnit != null) { //유닛끼리 서로 다른 진영일경우, 대미지를 준다 if (hitUnit.unitSide != this.owner.unitSide) { // 대미지를 준다 hitUnit.DealDamage(this.owner, Mathf.RoundToInt(Calculator.RandomDamage(damage))); // 독 컨디션 추가 hitUnit.conditionModule.AddCondition(new PoisonCondition(this.owner, 10)); } } Finish(); }
/// <summary> /// 타겟에게 대미지를 준다. /// </summary> public static void SimpleDamage(Unit attackedUnit, Unit target, float damage) { target.DealDamage(attackedUnit, damage); }