[add] EventBus使用
This commit is contained in:
@@ -1,26 +1,44 @@
|
||||
{
|
||||
"paths": {},
|
||||
"uuids": [
|
||||
"29FYIk+N1GYaeWH/q1NxQO",
|
||||
"2dL3kvpAxJu6GJ7RdqJG5J",
|
||||
"31vIlawANFZqnzLlSuHBfc",
|
||||
"41D7kWhyFGY7q4NDlzkazn",
|
||||
"6aoKpq6+5BVaCIpoemqt7E",
|
||||
"a8Anh32NZGRZegUtSgEj26"
|
||||
"71VhFCTINJM6/Ky3oX9nBT",
|
||||
"a8Anh32NZGRZegUtSgEj26",
|
||||
"b4P/PCArtIdIH38t6mlw8Y",
|
||||
"e8Ueib+qJEhL6mXAHdnwbi",
|
||||
"e97GVMl6JHh5Ml5qEDdSGa",
|
||||
"ecpdLyjvZBwrvm+cedCcQy",
|
||||
"f0BIwQ8D5Ml7nTNQbh1YlS"
|
||||
],
|
||||
"scenes": {
|
||||
"db://assets/Scene/helloworld.fire": "2dL3kvpAxJu6GJ7RdqJG5J"
|
||||
},
|
||||
"redirect": [],
|
||||
"deps": [],
|
||||
"redirect": [
|
||||
"ecpdLyjvZBwrvm+cedCcQy",
|
||||
0
|
||||
],
|
||||
"deps": [
|
||||
"internal"
|
||||
],
|
||||
"packs": {
|
||||
"05dd1dc0e": [
|
||||
"03f133834": [
|
||||
"29FYIk+N1GYaeWH/q1NxQO",
|
||||
"2dL3kvpAxJu6GJ7RdqJG5J",
|
||||
"31vIlawANFZqnzLlSuHBfc",
|
||||
"41D7kWhyFGY7q4NDlzkazn"
|
||||
"41D7kWhyFGY7q4NDlzkazn",
|
||||
"e97GVMl6JHh5Ml5qEDdSGa",
|
||||
"f0BIwQ8D5Ml7nTNQbh1YlS"
|
||||
],
|
||||
"0cfd22b7a": [
|
||||
"0e489d570": [
|
||||
"6aoKpq6+5BVaCIpoemqt7E",
|
||||
"a8Anh32NZGRZegUtSgEj26"
|
||||
"71VhFCTINJM6/Ky3oX9nBT",
|
||||
"a8Anh32NZGRZegUtSgEj26",
|
||||
"b4P/PCArtIdIH38t6mlw8Y",
|
||||
"e8Ueib+qJEhL6mXAHdnwbi"
|
||||
]
|
||||
},
|
||||
"name": "main",
|
||||
|
||||
1035
static/cocos-build/web-mobile/assets/main/import/03/03f133834.json
Normal file
1035
static/cocos-build/web-mobile/assets/main/import/03/03f133834.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,546 +0,0 @@
|
||||
[
|
||||
1,
|
||||
[
|
||||
"41D7kWhyFGY7q4NDlzkazn",
|
||||
"31vIlawANFZqnzLlSuHBfc",
|
||||
"6aoKpq6+5BVaCIpoemqt7E",
|
||||
"a8Anh32NZGRZegUtSgEj26"
|
||||
],
|
||||
[
|
||||
"node",
|
||||
"_spriteFrame",
|
||||
"_textureSetter",
|
||||
"label",
|
||||
"scene",
|
||||
"_parent"
|
||||
],
|
||||
[
|
||||
[
|
||||
"cc.Node",
|
||||
[
|
||||
"_name",
|
||||
"_id",
|
||||
"_components",
|
||||
"_contentSize",
|
||||
"_color",
|
||||
"_trs",
|
||||
"_parent",
|
||||
"_children"
|
||||
],
|
||||
1,
|
||||
9,
|
||||
5,
|
||||
5,
|
||||
7,
|
||||
1,
|
||||
2
|
||||
],
|
||||
"cc.SpriteFrame",
|
||||
[
|
||||
"cc.Widget",
|
||||
[
|
||||
"_alignFlags",
|
||||
"_originalWidth",
|
||||
"_originalHeight",
|
||||
"_wasAlignOnce",
|
||||
"node"
|
||||
],
|
||||
-1,
|
||||
1
|
||||
],
|
||||
[
|
||||
"cc.Sprite",
|
||||
[
|
||||
"_type",
|
||||
"_sizeMode",
|
||||
"node",
|
||||
"_spriteFrame"
|
||||
],
|
||||
1,
|
||||
1,
|
||||
6
|
||||
],
|
||||
[
|
||||
"cc.SceneAsset",
|
||||
[
|
||||
"_name",
|
||||
"asyncLoadAssets"
|
||||
],
|
||||
1
|
||||
],
|
||||
[
|
||||
"cc.Node",
|
||||
[
|
||||
"_name",
|
||||
"_parent",
|
||||
"_components",
|
||||
"_contentSize",
|
||||
"_trs"
|
||||
],
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
5,
|
||||
7
|
||||
],
|
||||
[
|
||||
"cc.Canvas",
|
||||
[
|
||||
"node"
|
||||
],
|
||||
3,
|
||||
1
|
||||
],
|
||||
[
|
||||
"e1b90/rohdEk4SdmmEZANaD",
|
||||
[
|
||||
"node",
|
||||
"label"
|
||||
],
|
||||
3,
|
||||
1,
|
||||
1
|
||||
],
|
||||
[
|
||||
"cc.Scene",
|
||||
[
|
||||
"_name",
|
||||
"_children",
|
||||
"_anchorPoint",
|
||||
"_trs"
|
||||
],
|
||||
2,
|
||||
2,
|
||||
5,
|
||||
7
|
||||
],
|
||||
[
|
||||
"cc.Label",
|
||||
[
|
||||
"_string",
|
||||
"_fontSize",
|
||||
"_lineHeight",
|
||||
"_N$horizontalAlign",
|
||||
"_N$verticalAlign",
|
||||
"node"
|
||||
],
|
||||
-2,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
4,
|
||||
0,
|
||||
1,
|
||||
3
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
7,
|
||||
2,
|
||||
4,
|
||||
3,
|
||||
5,
|
||||
3
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
6,
|
||||
2,
|
||||
4,
|
||||
3,
|
||||
2
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
6,
|
||||
2,
|
||||
3,
|
||||
5,
|
||||
2
|
||||
],
|
||||
[
|
||||
5,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
2
|
||||
],
|
||||
[
|
||||
6,
|
||||
0,
|
||||
1
|
||||
],
|
||||
[
|
||||
7,
|
||||
0,
|
||||
1,
|
||||
1
|
||||
],
|
||||
[
|
||||
2,
|
||||
0,
|
||||
4,
|
||||
2
|
||||
],
|
||||
[
|
||||
2,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5
|
||||
],
|
||||
[
|
||||
3,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
3
|
||||
],
|
||||
[
|
||||
3,
|
||||
2,
|
||||
3,
|
||||
1
|
||||
],
|
||||
[
|
||||
8,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
2
|
||||
],
|
||||
[
|
||||
9,
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
[
|
||||
[
|
||||
0,
|
||||
"helloworld",
|
||||
null
|
||||
],
|
||||
[
|
||||
1,
|
||||
"Canvas",
|
||||
"a286bbGknJLZpRpxROV6M94",
|
||||
[
|
||||
-5,
|
||||
-6,
|
||||
-7
|
||||
],
|
||||
[
|
||||
[
|
||||
5,
|
||||
-1
|
||||
],
|
||||
[
|
||||
6,
|
||||
-3,
|
||||
-2
|
||||
],
|
||||
[
|
||||
7,
|
||||
45,
|
||||
-4
|
||||
]
|
||||
],
|
||||
[
|
||||
4,
|
||||
4294769916
|
||||
],
|
||||
[
|
||||
5,
|
||||
960,
|
||||
640
|
||||
],
|
||||
[
|
||||
480,
|
||||
320,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
2,
|
||||
"background",
|
||||
1,
|
||||
[
|
||||
[
|
||||
8,
|
||||
45,
|
||||
200,
|
||||
150,
|
||||
{},
|
||||
-8
|
||||
],
|
||||
[
|
||||
9,
|
||||
1,
|
||||
0,
|
||||
-9,
|
||||
0
|
||||
]
|
||||
],
|
||||
[
|
||||
4,
|
||||
4281214491
|
||||
],
|
||||
[
|
||||
5,
|
||||
960,
|
||||
640
|
||||
]
|
||||
],
|
||||
[
|
||||
11,
|
||||
"New Node",
|
||||
[
|
||||
1
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
3,
|
||||
"cocos",
|
||||
1,
|
||||
[
|
||||
[
|
||||
10,
|
||||
-10,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
5,
|
||||
195,
|
||||
270
|
||||
],
|
||||
[
|
||||
0,
|
||||
50,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
4,
|
||||
"label",
|
||||
1,
|
||||
[
|
||||
-11
|
||||
],
|
||||
[
|
||||
5,
|
||||
342.33,
|
||||
60
|
||||
],
|
||||
[
|
||||
0,
|
||||
-180,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
12,
|
||||
"Hello, World!",
|
||||
60,
|
||||
60,
|
||||
1,
|
||||
1,
|
||||
5
|
||||
]
|
||||
],
|
||||
0,
|
||||
[
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
3,
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
-1,
|
||||
2,
|
||||
0,
|
||||
-2,
|
||||
4,
|
||||
0,
|
||||
-3,
|
||||
5,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
4,
|
||||
0,
|
||||
-1,
|
||||
6,
|
||||
0,
|
||||
4,
|
||||
3,
|
||||
1,
|
||||
5,
|
||||
3,
|
||||
11
|
||||
],
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
1,
|
||||
1
|
||||
],
|
||||
[
|
||||
0,
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
{
|
||||
"name": "HelloWorld",
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
195,
|
||||
270
|
||||
],
|
||||
"offset": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"originalSize": [
|
||||
195,
|
||||
270
|
||||
],
|
||||
"capInsets": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
1
|
||||
],
|
||||
0,
|
||||
[
|
||||
0
|
||||
],
|
||||
[
|
||||
2
|
||||
],
|
||||
[
|
||||
2
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
{
|
||||
"name": "singleColor",
|
||||
"rect": [
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
2
|
||||
],
|
||||
"offset": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"originalSize": [
|
||||
2,
|
||||
2
|
||||
],
|
||||
"capInsets": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
1
|
||||
],
|
||||
0,
|
||||
[
|
||||
0
|
||||
],
|
||||
[
|
||||
2
|
||||
],
|
||||
[
|
||||
3
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"type": "cc.Texture2D",
|
||||
"data": "0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"type": "cc.Texture2D",
|
||||
"data": "0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"
|
||||
}
|
||||
@@ -1,80 +1,98 @@
|
||||
window.__require = function e(t, n, r) {
|
||||
function s(o, u) {
|
||||
if (!n[o]) {
|
||||
if (!t[o]) {
|
||||
var b = o.split("/");
|
||||
b = b[b.length - 1];
|
||||
if (!t[b]) {
|
||||
var a = "function" == typeof __require && __require;
|
||||
if (!u && a) return a(b, !0);
|
||||
if (i) return i(b, !0);
|
||||
throw new Error("Cannot find module '" + o + "'");
|
||||
}
|
||||
o = b;
|
||||
}
|
||||
var f = n[o] = {
|
||||
exports: {}
|
||||
};
|
||||
t[o][0].call(f.exports, function(e) {
|
||||
var n = t[o][1][e];
|
||||
return s(n || e);
|
||||
}, f, f.exports, e, t, n, r);
|
||||
}
|
||||
return n[o].exports;
|
||||
}
|
||||
var i = "function" == typeof __require && __require;
|
||||
for (var o = 0; o < r.length; o++) s(r[o]);
|
||||
return s;
|
||||
function s(o, u) {
|
||||
if (!n[o]) {
|
||||
if (!t[o]) {
|
||||
var b = o.split("/");
|
||||
b = b[b.length - 1];
|
||||
if (!t[b]) {
|
||||
var a = "function" == typeof __require && __require;
|
||||
if (!u && a) return a(b, !0);
|
||||
if (i) return i(b, !0);
|
||||
throw new Error("Cannot find module '" + o + "'");
|
||||
}
|
||||
o = b;
|
||||
}
|
||||
var f = n[o] = {
|
||||
exports: {}
|
||||
};
|
||||
t[o][0].call(f.exports, function (e) {
|
||||
var n = t[o][1][e];
|
||||
return s(n || e);
|
||||
}, f, f.exports, e, t, n, r);
|
||||
}
|
||||
return n[o].exports;
|
||||
}
|
||||
var i = "function" == typeof __require && __require;
|
||||
for (var o = 0; o < r.length; o++) s(r[o]);
|
||||
return s;
|
||||
}({
|
||||
Helloworld: [ function(require, module, exports) {
|
||||
"use strict";
|
||||
cc._RF.push(module, "e1b90/rohdEk4SdmmEZANaD", "Helloworld");
|
||||
"use strict";
|
||||
var __extends = this && this.__extends || function() {
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf || {
|
||||
__proto__: []
|
||||
} instanceof Array && function(d, b) {
|
||||
d.__proto__ = b;
|
||||
} || function(d, b) {
|
||||
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
|
||||
};
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function(d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() {
|
||||
this.constructor = d;
|
||||
}
|
||||
d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
}();
|
||||
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var Helloworld = function(_super) {
|
||||
__extends(Helloworld, _super);
|
||||
function Helloworld() {
|
||||
var _this = null !== _super && _super.apply(this, arguments) || this;
|
||||
_this.label = null;
|
||||
_this.text = "hello";
|
||||
return _this;
|
||||
}
|
||||
Helloworld.prototype.start = function() {
|
||||
this.label.string = this.text;
|
||||
};
|
||||
__decorate([ property(cc.Label) ], Helloworld.prototype, "label", void 0);
|
||||
__decorate([ property ], Helloworld.prototype, "text", void 0);
|
||||
Helloworld = __decorate([ ccclass ], Helloworld);
|
||||
return Helloworld;
|
||||
}(cc.Component);
|
||||
exports.default = Helloworld;
|
||||
cc._RF.pop();
|
||||
}, {} ]
|
||||
}, {}, [ "Helloworld" ]);
|
||||
HelloWorld: [function (require, module, exports) {
|
||||
"use strict";
|
||||
cc._RF.push(module, "fdc7afxuBxOA7RfBuV+NSmm", "HelloWorld");
|
||||
"use strict";
|
||||
var __extends = this && this.__extends || function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf || {
|
||||
__proto__: []
|
||||
} instanceof Array && function (d, b) {
|
||||
d.__proto__ = b;
|
||||
} || function (d, b) {
|
||||
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
|
||||
};
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() {
|
||||
this.constructor = d;
|
||||
}
|
||||
d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
}();
|
||||
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var HelloWorld = function (_super) {
|
||||
__extends(HelloWorld, _super);
|
||||
function HelloWorld() {
|
||||
var _this = null !== _super && _super.apply(this, arguments) || this;
|
||||
_this.Label = null;
|
||||
_this.Text = "hello";
|
||||
_this.Btn = null;
|
||||
return _this;
|
||||
}
|
||||
HelloWorld.prototype.onClickBtn = function () {
|
||||
var url = window.location.search;
|
||||
var URLscheme = [];
|
||||
if (-1 !== url.indexOf("?")) {
|
||||
var str = url.substring(1);
|
||||
var strs = str.split("&");
|
||||
for (var i = 0; i < strs.length; i++) URLscheme[strs[i].split("=")[0]] = decodeURI(strs[i].split("=")[1]);
|
||||
}
|
||||
// if (URLscheme["host"]) {
|
||||
if (window.location.host) {
|
||||
// null === opener || void 0 === opener ? void 0 : opener.window.parent.postMessage({
|
||||
// window.frames.postMessage({
|
||||
// data: "hello"
|
||||
// }, window.location.host);
|
||||
// window.close();
|
||||
window.eventBus.emit("alert", "hello");
|
||||
return;
|
||||
}
|
||||
};
|
||||
__decorate([property(cc.Label)], HelloWorld.prototype, "Label", void 0);
|
||||
__decorate([property], HelloWorld.prototype, "Text", void 0);
|
||||
__decorate([property(cc.Button)], HelloWorld.prototype, "Btn", void 0);
|
||||
HelloWorld = __decorate([ccclass], HelloWorld);
|
||||
return HelloWorld;
|
||||
}(cc.Component);
|
||||
exports.default = HelloWorld;
|
||||
cc._RF.pop();
|
||||
}, {}]
|
||||
}, {}, ["HelloWorld"]);
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user