Commit feed66e8 authored by wangxin's avatar wangxin

test03

parent 510ed4b5
......@@ -1139,7 +1139,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": -46,
"width": 46,
"height": 245
},
"_anchorPoint": {
......@@ -1213,7 +1213,7 @@
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": -46,
"width": 46,
"height": 245
},
"_resize": 1,
......@@ -1263,7 +1263,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": -46,
"width": 46,
"height": 245
},
"_anchorPoint": {
......@@ -1276,7 +1276,7 @@
"ctor": "Float64Array",
"array": [
0,
-161.05399999999997,
-152.5,
0,
0,
0,
......@@ -1313,7 +1313,7 @@
"_alignFlags": 1,
"_left": 65,
"_right": 65,
"_top": 398.554,
"_top": 390,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
......@@ -1337,7 +1337,7 @@
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": -46,
"width": 46,
"height": 245
},
"_resize": 1,
......
......@@ -41,6 +41,10 @@ cc.Class({
onLoad() {
this.initSceneData();
this.initSize();
// 开启碰撞检查
var manager = cc.director.getCollisionManager();
manager.enabled = true;
},
_imageResList: null,
......@@ -176,12 +180,12 @@ cc.Class({
for (var i = 0; i < this.data.options.length; i++) {
const op_s = cc.instantiate(this.op_sound);
op_s.getComponent("op_sound")._opId = i;
op_s.getComponent("op_sound")._soundUrl = this.data.options[i]["audio_url_" + i];
op_s.getComponent("op_sound")._soundUrl = this.data.options[i].audio_url;
this.sounds_container.addChild(op_s);
const op_p = cc.instantiate(this.op_pic);
op_p.getComponent("op_pic")._opId = i;
op_p.getComponent("op_pic").setPic(this.data.options[i]["pic_url_" + i]);
op_p.getComponent("op_pic").setPic(this.data.options[i].pic_url);
this.pic_container.addChild(op_p);
}
},
......
......@@ -30,4 +30,20 @@ cc.Class({
});
}
},
/**
* 当碰撞产生的时候调用
* @param {Collider} other 产生碰撞的另一个碰撞组件
* @param {Collider} self 产生碰撞的自身的碰撞组件
*/
onCollisionEnter: function (other, self) {},
/**
* 当碰撞结束后调用
* @param {Collider} other 产生碰撞的另一个碰撞组件
* @param {Collider} self 产生碰撞的自身的碰撞组件
*/
onCollisionExit: function (other, self) {
console.log("on collision exit");
},
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment