import i18n from "../../../../i18n/i18n"; import ViewObject from "../../../../main/ViewObject"; /** * 机关无法通关的提示 * 目前只有选颜色的地方使用 */ const {ccclass, property} = cc._decorator; @ccclass export default class FTipsEvent extends ViewObject { @property(cc.Label) mLabel: cc.Label = null; @property(cc.Label) mBtName: cc.Label = null; /** * 点击查看提示回调 */ public onclickCallback:()=>void; public init(btName:string,about:string){ this.mBtName.string = i18n.t(btName) this.mLabel.string = i18n.t(about) } public setCallback(onclickCallback:()=>void){ this.onclickCallback = onclickCallback } public onclick(){ this.onclickCallback() } }