This commit is contained in:
9
board.go
9
board.go
@@ -46,17 +46,18 @@ func animate(sz image.Point, mqMessages chan mqtt.Message) *Animation {
|
||||
}
|
||||
func (a *Animation) Next() (image.Image, <-chan time.Time, error) {
|
||||
var incoming incomingMessage
|
||||
|
||||
a.animateMario()
|
||||
if a.doorbell != (Doorbell{}) {
|
||||
switch {
|
||||
case a.doorbell != (Doorbell{}):
|
||||
if a.countDown > 0 {
|
||||
a.ctx.DrawImageAnchored(a.doorbell.image, 0, 0, 0, 0)
|
||||
a.countDown -= 50
|
||||
} else {
|
||||
//a.image = a.image[:len(a.image)-1]
|
||||
a.doorbell = Doorbell{}
|
||||
a.countDown = 5000
|
||||
}
|
||||
default:
|
||||
a.ctx.Pop()
|
||||
a.animateMario()
|
||||
}
|
||||
a.ctx.SetColor(color.White)
|
||||
select {
|
||||
|
||||
Reference in New Issue
Block a user