Move damage and knockback to hitEntity (#5000)

* Move damge and knockback to `hitEntity`

* b.damage, not damage
This commit is contained in:
MEEP of Faith
2021-04-10 06:15:34 -07:00
committed by GitHub
parent 7e7e6b70e2
commit 0d8f95354f
3 changed files with 9 additions and 7 deletions

View File

@@ -93,12 +93,6 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
if(other instanceof Healthc h){
health = h.health();
h.damage(damage);
}
if(other instanceof Unit unit){
unit.impulse(Tmp.v3.set(unit).sub(this.x, this.y).nor().scl(type.knockback * 80f));
unit.apply(type.status, type.statusDuration);
}
//must be last.