diff options
Diffstat (limited to 'src/sign.cpp')
-rw-r--r-- | src/sign.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/sign.cpp b/src/sign.cpp index b9299d6..e488108 100644 --- a/src/sign.cpp +++ b/src/sign.cpp | |||
@@ -92,6 +92,8 @@ void Sign::update(size_t dt, Game& game) { | |||
92 | } | 92 | } |
93 | 93 | ||
94 | if (fullyRevealed) { | 94 | if (fullyRevealed) { |
95 | showNextArrow = false; | ||
96 | |||
95 | if (linesToShow.back().pause) { | 97 | if (linesToShow.back().pause) { |
96 | linesToShow.back().pause = false; | 98 | linesToShow.back().pause = false; |
97 | // Play a sound | 99 | // Play a sound |
@@ -126,6 +128,27 @@ void Sign::update(size_t dt, Game& game) { | |||
126 | } | 128 | } |
127 | linesToShow.push_back(lines.front()); | 129 | linesToShow.push_back(lines.front()); |
128 | lines.pop_front(); | 130 | lines.pop_front(); |
131 | } else { | ||
132 | showNextArrow = true; | ||
133 | } | ||
134 | } | ||
135 | } | ||
136 | |||
137 | if (showNextArrow) { | ||
138 | nextArrowBobTimer_.accumulate(dt); | ||
139 | while (nextArrowBobTimer_.step()) { | ||
140 | if (nextArrowBobDown_) { | ||
141 | nextArrowBobPos++; | ||
142 | |||
143 | if (nextArrowBobPos >= 4) { | ||
144 | nextArrowBobDown_ = false; | ||
145 | } | ||
146 | } else { | ||
147 | nextArrowBobPos--; | ||
148 | |||
149 | if (nextArrowBobPos <= 0) { | ||
150 | nextArrowBobDown_ = true; | ||
151 | } | ||
129 | } | 152 | } |
130 | } | 153 | } |
131 | } | 154 | } |