Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func _on_RoomDetector_area_entered(area: Area2D) -> void:
- # Gets collision shape and size of room
- var collision_shape: CollisionShape2D = area.get_node("CollisionShape2D")
- var size: Vector2 = collision_shape.shape.extents * 2
- # Changes camera's current room and size. check camera script for more info
- Global.change_room(collision_shape.global_position, size)
Advertisement
Add Comment
Please, Sign In to add comment