New function added to clear fader values (reset).

This commit is contained in:
dbenavid
2023-09-05 07:50:59 -04:00
parent 55fcb205ee
commit f4299e15a5
2 changed files with 21 additions and 4 deletions

View File

@@ -145,6 +145,8 @@ func (b *Bsoft) Update() error {
if b.curtain.IsComplete() {
if b.events[groovy.COMPLETED] != nil {
b.events[groovy.COMPLETED]()
b.curtain.Clear()
}
}
b.curtain.Update()
@@ -152,6 +154,11 @@ func (b *Bsoft) Update() error {
return nil
}
func (f *Fader) Clear() {
f.alpha = 0 //reset fader
f.counter = 0
}
func (b *Bsoft) Draw(screen *ebiten.Image) {
b.DrawGlitchLogo(screen)
b.DrawGlitchLogoText(screen)