Skip to content

Commit

Permalink
Play sound when koala eats leaves
Browse files Browse the repository at this point in the history
  • Loading branch information
TheodoreEhrenborg committed Jun 15, 2024
1 parent 4561caa commit 474cd83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Binary file added assets/nom.wav
Binary file not shown.
6 changes: 1 addition & 5 deletions src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,7 @@ update _ msg model =
}
in
( ActiveModel nextModel
, if modBy 10 act_model.gameTicks == 0 then
generateLeaf

else
if nextScore == year && act_model.score /= year then playFromElm "assets/happy_birthday.m4a" else Cmd.none
, Cmd.batch [if modBy 10 act_model.gameTicks == 0 then generateLeaf else Cmd.none, if nextScore == year && act_model.score /= year then playFromElm "assets/happy_birthday.m4a" else Cmd.none, if act_model.score /= nextScore then playFromElm "assets/nom.wav" else Cmd.none]
, Audio.cmdNone
)

Expand Down

0 comments on commit 474cd83

Please sign in to comment.