cc.Class({
    extends: cc.Component,

    properties: {
    },

    // use this for initialization
    onLoad: function ()
    {


        cc.find( 'Canvas/Button' ).on( 'touchend', ()=>
        {
            this.Test();
        } );
    },

    Test()
    {
        let label = cc.find( 'Canvas/label' ).getComponent( cc.Label );

        cc.loader.loadRes( 'HYQ', ( error, font ) =>
        {
            if( error ) { cc.log( 'Load Failed!' ); return; }
            label.font = font;
            cc.log( 'success!' );
        } );
    }
});
