12 lines
298 B
GDScript
12 lines
298 B
GDScript
class_name Camera extends Camera2D
|
|
|
|
func _ready() -> void:
|
|
LevelManager.Tilemap_boudns_change.connect(update_limits)
|
|
|
|
func update_limits(bounds: Array[Vector2]) -> void:
|
|
limit_left = int(bounds[0].x)
|
|
limit_top = int(bounds[0].y)
|
|
limit_right = int(bounds[1].x)
|
|
limit_bottom = int(bounds[1].y)
|
|
|