setCollisions method

void setCollisions(
  1. List<Rect> rect
)

Implementation

void setCollisions(List<Rect> rect){
  for(int i = 0; i < rect.length; i++){
    Size size = Size(rect[i].width,rect[i].height);
    Vector3 pos = Converter.toVector3(camera.position, Offset(rect[i].left,rect[i].top));
    collisions.add(
      Object(
        position: pos,
        size: size
      )
    );
  }
}