import { _decorator, Component, Node } from 'cc';
import { gameManager } from '../gameManager';
const { ccclass, property } = _decorator;

@ccclass('content_only_tip')
export class content_only_tip extends Component {
    @property(Node) btn_tip: Node = null;
    protected m_callback: Function = null;

    protected start(): void {
        this.btn_tip.on(Node.EventType.TOUCH_END, ()=> {
            gameManager.Singleton.showTips()
            if(this.m_callback!=null) {
                this.m_callback()
            }
        },this)
    }

    initView(callback:Function = null) {
        this.m_callback = callback
    }
}

