飘字提示效果

//飘动文字
FlutteringText(posX,posY,str){
    var node =new cc.Node("node");
    var label=node.addComponent(cc.Label);
    label.string=str;
    let color=new cc.Color(255,255,255);
    node.position=cc.v2(posX,posY);
    node.color=color;
    node.parent = this.node;
    let labelOutline = node.addComponent(cc.LabelOutline);
    let colorOutline = new cc.Color(0,0,0)
    labelOutline.color = colorOutline;
    labelOutline.width = 3;
    let moveac=cc.moveBy(1,0,400);
    let fadeac=cc.fadeOut(1);
    let callfun=cc.callFunc(function () {
        label.node.destroy();
    });
    label.node.runAction(cc.sequence(moveac,fadeac,callfun));
},

你可能感兴趣的:(飘字提示效果)