Only allow firing missiles in missile mode (#5)

master
Garrett Mills 4 years ago
parent 8896ded931
commit 8a5c4eec79
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -170,6 +170,7 @@ export default class TopLevelComponent extends Component {
* @param {number} column_index
*/
on_missile_fired([row_index, column_index]) {
if ( this.player_is_firing_missiles ) {
game_service.attempt_missile_fire([row_index, column_index])
// Give the user time to see whether they hit or not
@ -177,6 +178,7 @@ export default class TopLevelComponent extends Component {
game_service.advance_game_state()
}, 5000)
}
}
/**
* Called when the player has confirmed the player change.

Loading…
Cancel
Save