level.gd 290 B

12345678910
  1. extends Node2D
  2. func _ready():
  3. var camera = find_child("Camera2D")
  4. var min_pos = $CameraLimit_min.global_position
  5. var max_pos = $CameraLimit_max.global_position
  6. camera.limit_left = min_pos.x
  7. camera.limit_top = min_pos.y
  8. camera.limit_right = max_pos.x
  9. camera.limit_bottom = max_pos.y