smashball/scenes/levels/states/level_playing.gd
2025-11-19 18:19:31 -03:00

16 lines
423 B
GDScript

extends LevelState
func _enter(_previous_state_path: String, _data: Dictionary = {}) -> void:
get_tree().paused = false
func _handle_input(event: InputEvent) -> void:
if event.is_action_pressed("p1_pause"):
finished.emit(PAUSED, {"player": 1})
elif event.is_action_pressed("p2_pause"):
finished.emit(PAUSED, {"player": 2})
func _state_physics_update(delta: float) -> void:
level.camera.follow_gameplay(delta)