@@ -3,9 +3,11 @@ package dartzee.theme
33import dartzee.game.GameType
44import dartzee.`object`.ColourWrapper
55import dartzee.screen.animation.Animation
6+ import dartzee.screen.animation.CompositeAnimation
67import dartzee.screen.animation.DartScoreTrigger
78import dartzee.screen.animation.IAnimation
89import dartzee.screen.animation.IAnimationTrigger
10+ import dartzee.screen.animation.PlayerVictory
911import java.awt.Color
1012
1113private val lightOrange = Color .decode(" #ff8200" )
@@ -65,6 +67,17 @@ object Themes {
6567 dartboardColours = halloweenDartboardColours,
6668 )
6769
70+ private val easterAnimations: List <Pair <IAnimationTrigger , IAnimation >> =
71+ listOf (
72+ PlayerVictory to Animation (" thats-all-folks" , " /theme/easter/horrific/bugs-bunny.png" )
73+ ) +
74+ GameType .values().flatMap { gameType ->
75+ listOf (
76+ DartScoreTrigger (gameType, 0 ) to
77+ Animation (" egg-crack" , " /theme/easter/horrific/egg-crack.png" )
78+ )
79+ }
80+
6881 val EASTER =
6982 Theme (
7083 " easter" ,
@@ -76,6 +89,15 @@ object Themes {
7689 fontColor = Color .DARK_GRAY ,
7790 dartboardColours = easterDartboardColours,
7891 menuFontSize = 20f ,
92+ animations = easterAnimations.toMap(),
93+ )
94+
95+ private val beerSmashAnimation =
96+ CompositeAnimation (
97+ (1 .. 3 ).map { Animation (" smash$it " , " /theme/oktoberfest/horrific/dropped-beer.png" ) } +
98+ (1 .. 3 ).map {
99+ Animation (" smash$it " , " /theme/oktoberfest/horrific/dropped-beer-2.png" )
100+ }
79101 )
80102
81103 private val oktoberfestAnimations: List <Pair <IAnimationTrigger , IAnimation >> =
@@ -87,6 +109,7 @@ object Themes {
87109 Animation (" blimey" , " /theme/oktoberfest/horrific/blimey.png" ),
88110 DartScoreTrigger (gameType, 18 ) to
89111 Animation (" eighteen-pints" , " /theme/oktoberfest/horrific/pints-of-lager.png" ),
112+ DartScoreTrigger (gameType, 0 ) to beerSmashAnimation,
90113 )
91114 }
92115
0 commit comments