import { _decorator, Component, find, Node } from 'cc';
import * as cc from 'cc';
const { ccclass, property } = _decorator;

@ccclass('onbug')
export class onbug extends Component {
    start() {
        let Button = find('Canvas/Button');

        Button.on(cc.Node.EventType.TOUCH_END, ()=>{
            console.log('click');
        })

        this.scheduleOnce(()=>{
            this.node.pauseSystemEvents(true); 
            Button.active = false;
            this.node.resumeSystemEvents(true);
        }, 1);  

        this.scheduleOnce(()=>{
            Button.active = true;
        }, 3);    
    }

    update(deltaTime: number) {
        
    }
}


