Add new moods (happy, cry, poop) with animations and ChangeMood function in Zukitchi widget

This commit is contained in:
2026-01-02 16:56:47 +01:00
parent 325144e0d9
commit 21ac083ef0
3 changed files with 168 additions and 145 deletions
+15
View File
@@ -46,3 +46,18 @@ func draw(widget *text.Text) error {
lastFrame = time.Now()
return nil
}
func ChangeMood(mood string) {
pet.ChangeMood(mood)
go func() {
ticker := time.NewTicker(10 * time.Second)
for {
select {
case <-ticker.C:
pet.ChangeMood("idle")
ticker.Stop()
}
}
}()
}