used clang-format to format the code
This commit is contained in:
@@ -24,14 +24,14 @@ void alai::CameraLimit::_init()
|
||||
|
||||
void alai::CameraLimit::_ready()
|
||||
{
|
||||
auto node = find_node("Middleground");
|
||||
auto node = find_node("Middleground");
|
||||
auto middle_ground = cast_to<godot::TileMap>(node);
|
||||
if (middle_ground != NULL)
|
||||
{
|
||||
auto used_rect = middle_ground->get_used_rect();
|
||||
auto bounds = godot::Vector2(used_rect.position.x + used_rect.size.x, used_rect.position.y + used_rect.size.y);
|
||||
node = get_tree()->get_root()->find_node("Camera2D", true, false);
|
||||
auto camera = cast_to<godot::Camera2D>(node);
|
||||
auto bounds = godot::Vector2(used_rect.position.x + used_rect.size.x, used_rect.position.y + used_rect.size.y);
|
||||
node = get_tree()->get_root()->find_node("Camera2D", true, false);
|
||||
auto camera = cast_to<godot::Camera2D>(node);
|
||||
if (camera != NULL)
|
||||
{
|
||||
camera->set_limit(2, bounds.x * middle_ground->get_cell_size().x);
|
||||
|
||||
Reference in New Issue
Block a user