コード例 #1
0
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
}