- if event.is_action_pressed("player_left"):
- playerTurn.emit(self)
- global_rotate(Vector3.UP, PI/2)
- elif event.is_action_pressed("player_right"):
- playerTurn.emit(self)
- global_rotate(Vector3.UP, -PI/2)
+ if _state == state.ALIVE:
+ if event.is_action_pressed("player_left"):
+ global_rotate(Vector3.UP, PI/2)
+ playerTurn.emit(self)
+ elif event.is_action_pressed("player_right"):
+ global_rotate(Vector3.UP, -PI/2)
+ playerTurn.emit(self)
+ else:
+ if event.is_action_pressed("player_restart"):
+ playerRestart.emit(self)