
cc.Class({
    extends: cc.Component,

    properties: {
        sp_water_show: cc.Sprite,
        camera_water: cc.Camera,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        const texture = new cc.RenderTexture();
        texture.initWithSize(this.sp_water_show.node.width, this.sp_water_show.node.height);

        const spriteFrame = new cc.SpriteFrame();
        spriteFrame.setTexture(texture);
        spriteFrame.setFlipY(true);
        this.camera_water.targetTexture = texture;
        this.sp_water_show.spriteFrame = spriteFrame;

    },
    start() {

    },

    // update (dt) {},
});
