Refactoring in explosion sounds.
This commit is contained in:
@@ -20,4 +20,6 @@ type Enemies interface {
|
||||
SetTouched()
|
||||
ClearTouched()
|
||||
IsTouched() bool
|
||||
ExplosionInitiated() bool
|
||||
SetExplosionInitiated()
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ type FlyEye struct {
|
||||
hit bool
|
||||
touched bool
|
||||
toggle bool
|
||||
sploding bool
|
||||
}
|
||||
|
||||
func NewFlyEye() *FlyEye {
|
||||
@@ -34,6 +35,7 @@ func NewFlyEye() *FlyEye {
|
||||
hit: false,
|
||||
touched: false,
|
||||
toggle: false,
|
||||
sploding: false,
|
||||
}
|
||||
f.Maks.Fill(color.White)
|
||||
return f
|
||||
@@ -151,3 +153,11 @@ func (f *FlyEye) GetEnemyState() gamedata.EnemyState {
|
||||
func (f *FlyEye) SetPosition(p gamedata.Coordinates) {
|
||||
f.position = p
|
||||
}
|
||||
|
||||
func (f *FlyEye) ExplosionInitiated() bool {
|
||||
return f.sploding
|
||||
}
|
||||
|
||||
func (f *FlyEye) SetExplosionInitiated() {
|
||||
f.sploding = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user