Cloud layer.

This commit is contained in:
2024-11-16 12:31:22 -05:00
parent fd46346346
commit 1d65d0046e
9 changed files with 214 additions and 12 deletions

View File

@@ -9,6 +9,10 @@ import (
"github.com/hajimehoshi/ebiten/v2"
)
const (
FG_MAXHEALTH = 100
)
type FlyGoblin struct {
Sprite *ebiten.Image
Maks *ebiten.Image
@@ -18,10 +22,8 @@ type FlyGoblin struct {
state gamedata.EnemyState
cycle int
health int
dyingcount int
damageduration int
right bool
hit bool
touched bool
toggle bool
sploding bool
@@ -33,7 +35,7 @@ func NewFlyGoblin() *FlyGoblin {
Sprite: ebiten.NewImage(96, 96),
Maks: ebiten.NewImage(96, 96),
MaksDest: ebiten.NewImage(96, 96),
health: 100,
health: FG_MAXHEALTH,
damageduration: 0,
}
fg.Maks.Fill(color.White)
@@ -176,3 +178,7 @@ func (f *FlyGoblin) SetExplosionInitiated() {
func (f *FlyGoblin) Health() int {
return f.health
}
func (f *FlyGoblin) MaxHealth() int {
return FG_MAXHEALTH
}