level.gd 363 B

1234567891011121314151617
  1. extends Node2D
  2. const LIMIT_LEFT = -315
  3. const LIMIT_TOP = -250
  4. const LIMIT_RIGHT = 955
  5. const LIMIT_BOTTOM = 690
  6. func _ready():
  7. for child in get_children():
  8. if child is Player:
  9. var camera = child.get_node("Camera")
  10. camera.limit_left = LIMIT_LEFT
  11. camera.limit_top = LIMIT_TOP
  12. camera.limit_right = LIMIT_RIGHT
  13. camera.limit_bottom = LIMIT_BOTTOM