
const {ccclass, property} = cc._decorator;
/**
 * 主界面的事件按钮
 */
@ccclass
export default class EventButton extends cc.Component {

    @property(cc.Sprite)
    mIcon: cc.Sprite = null;

    private callback:()=>void;

    public setCallback(callback:()=>void){
        this.callback = callback;
    }
    
    public onclick(){
        if(this.callback){
            this.callback();
        }
    }
}
