(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/NewScript/test.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, 'd53c8B3bzNPXYYa6jiqFyYs', 'test', __filename);
// NewScript/test.js

'use strict';

var a = 1;

function mapStateToProps(state) {
  return {
    b: state.a.b
  };
}

function mapDispatchToProps() {
  return {
    // click: () => dispatch({ type: 'afsfasf' }),
  };
}
cc.Class({
  extends: cc.Component,

  properties: {
    // lab: {
    //   default: null,
    //   type: cc.Node,
    // },
    // root: {
    //   default: null,
    //   type: cc.Node,
    // },
  },

  onLoad: function onLoad() {},
  start: function start() {
    // if (cc.director.getScene().name !== 'a') {
    if (a === 1 || a === 2) {
      console.log('load');
      cc.loader.loadResDir('/4k', function (err, e) {
        console.log('in', err, e);
      });
    }
    // cc.director.loadScene('a');
    if (a === 1 || a === 2) {
      console.log('restart');
      cc.game.restart();
    }
    // } else {
    //   cc.loader.loadResDir('/prefab', (err, a) => {
    //     console.log('in11', err, a);
    //   });
    // }
    a += 1;
  }
}

// onClick() {
//   cc.game.restart();
// },
);

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=test.js.map
        