Fixed Boats powering up and down correctly. Icons respond correctly

#story[1293]
This commit is contained in:
William Muir
2017-09-26 19:43:32 +13:00
parent ab07c7f298
commit 4b7dfe38c4
4 changed files with 32 additions and 23 deletions
@@ -55,6 +55,7 @@ import seng302.model.RaceState;
import seng302.model.mark.CompoundMark;
import seng302.model.mark.Mark;
import seng302.model.stream.xml.parser.RaceXMLData;
import seng302.model.token.Token;
import seng302.model.token.TokenType;
import seng302.utilities.Sounds;
import seng302.visualiser.GameView3D;
@@ -307,6 +308,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
*/
private void displayPowerUpIcon(ClientYacht yacht, TokenType tokenType) {
if (yacht == player) {
if (iconToDisplay != null) {
iconToDisplay.setVisible(false);
}
switch (tokenType) {
case BOOST:
@@ -349,6 +353,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
if (yacht == player) {
blinkingTimer.cancel();
iconToDisplay.setVisible(false);
iconToDisplay = null;
}
}