Cloud layer.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user