import { getTextureByName } from "./utils";

const createBubblePic = (r: number) => {
    const bubbleTexture: engine.Texture = getTextureByName('bubble');
    const bubblePic = new engine.Sprite(bubbleTexture);
    //bubblePic.anchorX = 76;
    //bubblePic.anchorY = 78;
    //bubblePic.anchorTexture.set(0.5,0.5)
    //bubblePic.x = bubblePic.x-76
    //bubblePic.y = bubblePic.y-78
    bubblePic.scaleX = bubblePic.scaleY = r * 2 / 100; //默认球的尺寸100
    return bubblePic;
}

export default createBubblePic