(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/Script/Helloworld.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, 'e1b90/rohdEk4SdmmEZANaD', 'Helloworld', __filename);
// Script/Helloworld.ts

Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var socket_io_1_4_8_1 = require("./socket.io.1.4.8");
var Helloworld = /** @class */ (function (_super) {
    __extends(Helloworld, _super);
    function Helloworld() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        return _this;
    }
    Helloworld.prototype.start = function () {
        var self = this;
        var socket = null;
        if (!cc.sys.isNative) {
            socket = socket_io_1_4_8_1.connect('http://192.168.31.246:8000');
            socket.on('connected', function (msg) {
                self.label.string = "web调试：" + msg;
                console.log("返回信息-------------" + msg);
            });
        }
        else {
            socket = io.connect('http://192.168.31.246:8000');
            socket.on('connected', function (msg) {
                self.label.string = "安卓调试：" + msg;
                console.log("返回信息-------------" + msg);
            });
        }
    };
    __decorate([
        property(cc.Label)
    ], Helloworld.prototype, "label", void 0);
    Helloworld = __decorate([
        ccclass
    ], Helloworld);
    return Helloworld;
}(cc.Component));
exports.default = Helloworld;

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