diff --git a/mover.go b/mover.go index 3ab9cc8..f1ad348 100644 --- a/mover.go +++ b/mover.go @@ -134,7 +134,7 @@ func (m *Mover) Draw() { m.Sprite.DrawImage(shadow, op) m.Sprite.DrawImage(flyeyeImage2.SubImage(image.Rect(x0, y0, x1, y1)).(*ebiten.Image), nil) case MoverActionDying: - m.dyingcount++ + if (m.cycles/5)%2 == 0 { m.MaksDest.DrawImage(flyeyeImage2.SubImage(image.Rect(x0, y0, x1, y1)).(*ebiten.Image), nil) @@ -147,7 +147,7 @@ func (m *Mover) Draw() { } else { m.Sprite.DrawImage(flyeyeImage2.SubImage(image.Rect(x0, y0, x1, y1)).(*ebiten.Image), nil) } - if m.dyingcount > 60 { + if m.dyingcount >= 31 { m.cycles = 0 m.SetHit() } @@ -172,6 +172,9 @@ func (m *Mover) Update() { m.Angle = float64(m.cycles) / (math.Pi * 2) } */ + if m.Action == MoverActionDying { + m.dyingcount++ + } m.cycles++ }