spin up and cleanup belong to animation
All checks were successful
build rgb-board / build (push) Successful in 2m10s
All checks were successful
build rgb-board / build (push) Successful in 2m10s
This commit is contained in:
9
board.go
9
board.go
@@ -48,14 +48,7 @@ func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
|
||||
var incoming incomingMessage
|
||||
switch {
|
||||
case a.doorbell != (Doorbell{}):
|
||||
if a.countDown > 0 {
|
||||
a.ctx.DrawImageAnchored(a.doorbell.image, 0, 0, 0, 0)
|
||||
a.countDown -= 50
|
||||
} else {
|
||||
a.doorbell = Doorbell{}
|
||||
a.countDown = 5000
|
||||
a.ctx.Pop()
|
||||
}
|
||||
a.animateDoorbell()
|
||||
default:
|
||||
a.animateMario()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user