Files
godot-demo-projects/2d/platformer/level/level.gd
A Thousand Ships 0343cedd48 General proofreading (#1262)
* General proofreading for grammar and spelling
* General formatting
* Addition of appropriate literals where appropriate, i.e. `&"foo"` for `StringName` cases and `^"foo/bar"` for `NodePath` cases
2025-10-11 01:39:59 -07:00

17 lines
363 B
GDScript

extends Node2D
const LIMIT_LEFT = -315
const LIMIT_TOP = -250
const LIMIT_RIGHT = 955
const LIMIT_BOTTOM = 690
func _ready():
for child in get_children():
if child is Player:
var camera = child.get_node(^"Camera")
camera.limit_left = LIMIT_LEFT
camera.limit_top = LIMIT_TOP
camera.limit_right = LIMIT_RIGHT
camera.limit_bottom = LIMIT_BOTTOM