- 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)
+ if _state == state.ALIVE:
+ if event.is_action_pressed(_input_map.left):
+ global_rotate(Vector3.UP, PI/2)
+ playerTurn.emit(self)
+ elif event.is_action_pressed(_input_map.right):
+ global_rotate(Vector3.UP, -PI/2)
+ playerTurn.emit(self)
+ else:
+ if event.is_action_pressed(_input_map.restart):
+ playerRestart.emit(self)