Move damage and knockback to hitEntity (#5000)
* Move damge and knockback to `hitEntity` * b.damage, not damage
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user