using Godot;
using static ld48.Extensions;

public class CaveSimple : StaticBody2D {
    public override void _Ready() {
        base._Ready();

        foreach (var child in GetNode("Rocks").GetChildren()) {
            if (child is Polygon2D poly) {
                var collision = new CollisionPolygon2D { Polygon = poly.Polygon };
                AddChild(collision);
                collision.Position = poly.Position;
            }
        }
    }
}

