Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ET04
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ET04
Commits
feed66e8
Commit
feed66e8
authored
Feb 25, 2021
by
wangxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test03
parent
510ed4b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+6
-6
Scene.js
play/assets/tmpGame/script/Scene.js
+6
-2
op_sound.js
play/assets/tmpGame/script/op_sound.js
+16
-0
No files found.
play/assets/tmpGame/scene/Scene.fire
View file @
feed66e8
...
...
@@ -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,
-1
61.05399999999997
,
-1
52.5
,
0,
0,
0,
...
...
@@ -1313,7 +1313,7 @@
"_alignFlags": 1,
"_left": 65,
"_right": 65,
"_top": 39
8.554
,
"_top": 39
0
,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -1337,7 +1337,7 @@
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width":
-
46,
"width": 46,
"height": 245
},
"_resize": 1,
...
...
play/assets/tmpGame/script/Scene.js
View file @
feed66e8
...
...
@@ -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
);
}
},
...
...
play/assets/tmpGame/script/op_sound.js
View file @
feed66e8
...
...
@@ -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
"
);
},
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment