You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
762 B
31 lines
762 B
1 week ago
|
import Common5 from "../../Platform/th/Common5";
|
||
|
|
||
|
const {ccclass, property} = cc._decorator;
|
||
|
|
||
|
@ccclass
|
||
|
export default class CommonTextTips extends cc.Component {
|
||
|
@property(cc.Node)
|
||
|
contentNode: cc.Node = null;
|
||
|
@property(cc.Node)
|
||
|
contentStr: cc.Node = null;
|
||
|
onLoad () {
|
||
|
|
||
|
}
|
||
|
|
||
|
start () {
|
||
|
|
||
|
}
|
||
|
initView(contentStr){
|
||
|
this.contentStr.getComponent(cc.Label).string = contentStr
|
||
|
this.contentNode.active = true
|
||
|
this.contentNode.stopAllActions()
|
||
|
cc.tween(this.contentNode)
|
||
|
.set({y:0,opacity:255})
|
||
|
.delay(2.5).to(1, { y: 555, opacity: 0 }).call(() => {
|
||
|
this.node.removeFromParent()
|
||
|
Common5.commonTextTipNode = null
|
||
|
}).start();
|
||
|
|
||
|
}
|
||
|
}
|