Bullet support

This commit is contained in:
2023-12-28 14:42:20 +01:00
parent b6776fa9f3
commit d336fa4d15
9 changed files with 196 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package zombie
import (
"bytes"
"fmt"
"github.com/hajimehoshi/ebiten/v2"
"gitlab.com/kbr4/9heroja/collision"
"gitlab.com/kbr4/9heroja/configuration"
@@ -147,6 +148,9 @@ func (z *Zombie) HandleCollisionEvent(other collision.Collidable) {
case collision.Hero:
z.Stop()
z.IsDead = true
case collision.Bullet:
fmt.Println("Zombie hit by bullet")
z.Stop()
z.IsDead = true
}
}