Sprite(this.texture, {this.srcrect}) { setAnchorPoint(Point(0.5, 0.5)); if (texture != nullptr) { setContentSize(texture.getSize()!); } if (srcrect != null) { setContentSize(srcrect!.size); } }