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.
51 lines
1.0 KiB
51 lines
1.0 KiB
1 week ago
|
|
||
|
import Common5 from "../../../Platform/th/Common5";
|
||
|
import GameBase from "../../SCommon/GameBase";
|
||
|
|
||
|
|
||
|
|
||
|
const {ccclass, property} = cc._decorator;
|
||
|
|
||
|
@ccclass
|
||
|
export default class ZuLinHeTong extends GameBase {
|
||
|
|
||
|
@property(cc.Label)
|
||
|
moneyStr:cc.Label = null
|
||
|
|
||
|
@property(cc.Node)
|
||
|
gaiZhang:cc.Node = null
|
||
|
|
||
|
@property(cc.Sprite)
|
||
|
heTong:cc.Sprite = null
|
||
|
|
||
|
@property([cc.SpriteFrame])
|
||
|
spFrameTab:cc.SpriteFrame[] = []
|
||
|
|
||
|
|
||
|
|
||
|
callFunc = null
|
||
|
|
||
|
onDestroy(){
|
||
|
super.onDestroy()
|
||
|
}
|
||
|
|
||
|
onLoad () {
|
||
|
super.onLoad()
|
||
|
}
|
||
|
|
||
|
initView(index,money,callFunc){
|
||
|
this.scheduleOnce(()=>{
|
||
|
this.gaiZhang.active = true
|
||
|
this.gaiZhang.getComponent(sp.Skeleton).setAnimation(0,'盖章',false)
|
||
|
},1)
|
||
|
this.heTong.spriteFrame = this.spFrameTab[index]
|
||
|
this.moneyStr.string = `${Common5.getNumberChangeHanzi(money,'1')}`
|
||
|
this.callFunc = callFunc
|
||
|
}
|
||
|
onBtnSure(){
|
||
|
this.node.removeFromParent()
|
||
|
this.callFunc && this.callFunc()
|
||
|
}
|
||
|
|
||
|
}
|