func (p *Physics) DamageBase(b *state.Bullet, base *state.Base) bool { base.CurrentHealth -= p.BulletDamage b.ShouldRemove = true if base.CurrentHealth <= 0 { base.CurrentHealth = 0 return true } return false }
func (p *Physics) DamageShieldGenerator(b *state.Bullet, s *state.ShieldGenerator) bool { s.CurrentHealth -= p.BulletDamage b.ShouldRemove = true if s.CurrentHealth <= 0 { s.Shield.IsEnabled = false s.CurrentHealth = 0 return true } return false }
func (p *Physics) BoundBullet(b *state.Bullet) { if !p.inBounds(b.X, b.Y) { b.ShouldRemove = true } }
func (p *Physics) DamageVehicle(v *state.Vehicle, b *state.Bullet) bool { b.ShouldRemove = true return p.damageVehicle(v, p.BulletDamage) }