(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/scripts/Game.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, 'f9fb2PPCJpD+Y7L8NKtoG7F', 'Game', __filename);
// scripts/Game.js

'use strict';

cc.Class({
    extends: cc.Component,

    properties: {
        brush: cc.Node
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad: function onLoad() {
        this.node.on('touchstart', this.onTouchStart, this);
        this.node.on('touchmove', this.onTouchMove, this);
    },
    onTouchStart: function onTouchStart(event) {
        // 设置画笔起始位置
        var pos = this.node.convertToNodeSpaceAR(event.getLocation());
        this.brush.getComponent('Brush').setBrushPos(pos.x, pos.y);
    },
    onTouchMove: function onTouchMove(event) {
        var pos = this.node.convertToNodeSpaceAR(event.getLocation());
        this.brush.getComponent('Brush').drawTo(pos.x, pos.y);
    }
    // update (dt) {},

});

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