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
0572104a
Commit
0572104a
authored
4 years ago
by
wangxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beta 1.1
parent
9bfc7f14
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
56 deletions
+81
-56
Scene.fire
play/assets/tmpGame/scene/Scene.fire
+70
-49
op_pic.js
play/assets/tmpGame/script/op_pic.js
+8
-4
op_sound.js
play/assets/tmpGame/script/op_sound.js
+3
-3
No files found.
play/assets/tmpGame/scene/Scene.fire
View file @
0572104a
...
@@ -78,28 +78,28 @@
...
@@ -78,28 +78,28 @@
"__id__": 7
"__id__": 7
},
},
{
{
"__id__": 1
5
"__id__": 1
6
},
},
{
{
"__id__": 2
5
"__id__": 2
6
},
},
{
{
"__id__": 2
8
"__id__": 2
9
},
},
{
{
"__id__": 3
1
"__id__": 3
2
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
"__id__": 35
},
{
{
"__id__": 36
"__id__": 36
},
},
{
{
"__id__": 37
"__id__": 37
},
{
"__id__": 38
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
"array": [
"array": [
0,
0,
0,
0,
3
10.037094554829
,
3
09.1710691510446
,
0,
0,
0,
0,
0,
0,
...
@@ -356,14 +356,14 @@
...
@@ -356,14 +356,14 @@
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
"__id__": 11
},
{
{
"__id__": 12
"__id__": 12
},
},
{
{
"__id__": 13
"__id__": 13
},
{
"__id__": 14
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -429,6 +429,9 @@
...
@@ -429,6 +429,9 @@
},
},
{
{
"__id__": 10
"__id__": 10
},
{
"__id__": 11
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -495,8 +498,8 @@
...
@@ -495,8 +498,8 @@
"_srcBlendFactor": 770,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_useOriginalSize": false,
"_useOriginalSize": false,
"_string": "",
"_string": "
Listen and drago
",
"_N$string": "",
"_N$string": "
Listen and drago
",
"_fontSize": 72,
"_fontSize": 72,
"_lineHeight": 104,
"_lineHeight": 104,
"_enableWrapText": true,
"_enableWrapText": true,
...
@@ -542,6 +545,24 @@
...
@@ -542,6 +545,24 @@
"_originalHeight": 0,
"_originalHeight": 0,
"_id": "f9RF+04oxFIprvZRGytBg3"
"_id": "f9RF+04oxFIprvZRGytBg3"
},
},
{
"__type__": "cc.LabelOutline",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 8
},
"_enabled": true,
"_color": {
"__type__": "cc.Color",
"r": 230,
"g": 51,
"b": 65,
"a": 255
},
"_width": 2,
"_id": "c0hrR8OJlLtLZzVHoQowZp"
},
{
{
"__type__": "cc.Sprite",
"__type__": "cc.Sprite",
"_name": "",
"_name": "",
...
@@ -615,7 +636,7 @@
...
@@ -615,7 +636,7 @@
"zoomScale": 1.2,
"zoomScale": 1.2,
"clickEvents": [
"clickEvents": [
{
{
"__id__": 1
4
"__id__": 1
5
}
}
],
],
"_N$interactable": true,
"_N$interactable": true,
...
@@ -692,13 +713,13 @@
...
@@ -692,13 +713,13 @@
},
},
"_children": [
"_children": [
{
{
"__id__": 1
6
"__id__": 1
7
},
},
{
{
"__id__":
19
"__id__":
20
},
},
{
{
"__id__": 2
2
"__id__": 2
3
}
}
],
],
"_active": false,
"_active": false,
...
@@ -756,11 +777,11 @@
...
@@ -756,11 +777,11 @@
"_name": "font",
"_name": "font",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
5
"__id__": 1
6
},
},
"_children": [
"_children": [
{
{
"__id__": 1
7
"__id__": 1
8
}
}
],
],
"_active": true,
"_active": true,
...
@@ -818,13 +839,13 @@
...
@@ -818,13 +839,13 @@
"_name": "BRLNSDB",
"_name": "BRLNSDB",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
6
"__id__": 1
7
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
8
"__id__": 1
9
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -880,7 +901,7 @@
...
@@ -880,7 +901,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 1
7
"__id__": 1
8
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -912,11 +933,11 @@
...
@@ -912,11 +933,11 @@
"_name": "img",
"_name": "img",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
5
"__id__": 1
6
},
},
"_children": [
"_children": [
{
{
"__id__": 2
0
"__id__": 2
1
}
}
],
],
"_active": true,
"_active": true,
...
@@ -974,13 +995,13 @@
...
@@ -974,13 +995,13 @@
"_name": "icon",
"_name": "icon",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__":
19
"__id__":
20
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
1
"__id__": 2
2
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1036,7 +1057,7 @@
...
@@ -1036,7 +1057,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
0
"__id__": 2
1
},
},
"_enabled": true,
"_enabled": true,
"_materials": [],
"_materials": [],
...
@@ -1062,11 +1083,11 @@
...
@@ -1062,11 +1083,11 @@
"_name": "audio",
"_name": "audio",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 1
5
"__id__": 1
6
},
},
"_children": [
"_children": [
{
{
"__id__": 2
3
"__id__": 2
4
}
}
],
],
"_active": true,
"_active": true,
...
@@ -1124,13 +1145,13 @@
...
@@ -1124,13 +1145,13 @@
"_name": "btn",
"_name": "btn",
"_objFlags": 0,
"_objFlags": 0,
"_parent": {
"_parent": {
"__id__": 2
2
"__id__": 2
3
},
},
"_children": [],
"_children": [],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
4
"__id__": 2
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1186,7 +1207,7 @@
...
@@ -1186,7 +1207,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
3
"__id__": 2
4
},
},
"_enabled": true,
"_enabled": true,
"_clip": {
"_clip": {
...
@@ -1210,10 +1231,10 @@
...
@@ -1210,10 +1231,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 2
6
"__id__": 2
7
},
},
{
{
"__id__": 2
7
"__id__": 2
8
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1269,7 +1290,7 @@
...
@@ -1269,7 +1290,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
5
"__id__": 2
6
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -1296,7 +1317,7 @@
...
@@ -1296,7 +1317,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
5
"__id__": 2
6
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1334,10 +1355,10 @@
...
@@ -1334,10 +1355,10 @@
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__":
29
"__id__":
30
},
},
{
{
"__id__": 3
0
"__id__": 3
1
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -1393,7 +1414,7 @@
...
@@ -1393,7 +1414,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
8
"__id__": 2
9
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -1420,7 +1441,7 @@
...
@@ -1420,7 +1441,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 2
8
"__id__": 2
9
},
},
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
...
@@ -1458,14 +1479,14 @@
...
@@ -1458,14 +1479,14 @@
"_active": false,
"_active": false,
"_components": [
"_components": [
{
{
"__id__": 3
2
"__id__": 3
3
},
},
{
{
"__id__": 3
3
"__id__": 3
4
}
}
],
],
"_prefab": {
"_prefab": {
"__id__": 3
4
"__id__": 3
5
},
},
"_opacity": 255,
"_opacity": 255,
"_color": {
"_color": {
...
@@ -1519,7 +1540,7 @@
...
@@ -1519,7 +1540,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
1
"__id__": 3
2
},
},
"_enabled": true,
"_enabled": true,
"_materials": [
"_materials": [
...
@@ -1622,7 +1643,7 @@
...
@@ -1622,7 +1643,7 @@
"_name": "",
"_name": "",
"_objFlags": 0,
"_objFlags": 0,
"node": {
"node": {
"__id__": 3
1
"__id__": 3
2
},
},
"_enabled": true,
"_enabled": true,
"alignMode": 1,
"alignMode": 1,
...
@@ -1647,7 +1668,7 @@
...
@@ -1647,7 +1668,7 @@
{
{
"__type__": "cc.PrefabInfo",
"__type__": "cc.PrefabInfo",
"root": {
"root": {
"__id__": 3
1
"__id__": 3
2
},
},
"asset": {
"asset": {
"__uuid__": "d30b053b-c7eb-4811-951c-01c98b5825bf"
"__uuid__": "d30b053b-c7eb-4811-951c-01c98b5825bf"
...
@@ -1711,10 +1732,10 @@
...
@@ -1711,10 +1732,10 @@
"__id__": 9
"__id__": 9
},
},
"sounds_container": {
"sounds_container": {
"__id__": 2
5
"__id__": 2
6
},
},
"pic_container": {
"pic_container": {
"__id__": 2
8
"__id__": 2
9
},
},
"op_sound": {
"op_sound": {
"__uuid__": "f816bebc-d7fa-41ca-aa93-efe1af15931d"
"__uuid__": "f816bebc-d7fa-41ca-aa93-efe1af15931d"
...
@@ -1731,7 +1752,7 @@
...
@@ -1731,7 +1752,7 @@
}
}
],
],
"particle_paper": {
"particle_paper": {
"__id__": 3
1
"__id__": 3
2
},
},
"_opSoundPos": [],
"_opSoundPos": [],
"_opPicPos": [],
"_opPicPos": [],
...
...
This diff is collapsed.
Click to expand it.
play/assets/tmpGame/script/op_pic.js
View file @
0572104a
...
@@ -33,6 +33,7 @@ cc.Class({
...
@@ -33,6 +33,7 @@ cc.Class({
_spriteFrame
:
null
,
_spriteFrame
:
null
,
_width
:
null
,
_width
:
null
,
_height
:
null
,
_height
:
null
,
_isMoved
:
false
,
},
},
onEnable
()
{
onEnable
()
{
...
@@ -91,9 +92,8 @@ cc.Class({
...
@@ -91,9 +92,8 @@ cc.Class({
let
delta
=
touch
.
getDelta
();
let
delta
=
touch
.
getDelta
();
this
.
node
.
x
+=
delta
.
x
;
this
.
node
.
x
+=
delta
.
x
;
this
.
node
.
y
+=
delta
.
y
;
this
.
node
.
y
+=
delta
.
y
;
if
(
this
.
pic_selected
.
active
)
{
this
.
pic_selected
.
active
=
false
;
this
.
_isMoved
=
true
;
}
},
},
onTouchEnd
()
{
onTouchEnd
()
{
if
(
this
.
_isContact
&&
!
this
.
_soundOp
.
node
.
getComponent
(
"
op_sound
"
).
_isRight
)
{
if
(
this
.
_isContact
&&
!
this
.
_soundOp
.
node
.
getComponent
(
"
op_sound
"
).
_isRight
)
{
...
@@ -112,6 +112,11 @@ cc.Class({
...
@@ -112,6 +112,11 @@ cc.Class({
}
else
{
}
else
{
this
.
node
.
setPosition
(
this
.
_ori_pos
);
this
.
node
.
setPosition
(
this
.
_ori_pos
);
}
}
if
(
this
.
_isMoved
)
{
this
.
_isMoved
=
false
;
this
.
pic_selected
.
active
=
false
;
}
},
},
/**
/**
...
@@ -137,7 +142,6 @@ cc.Class({
...
@@ -137,7 +142,6 @@ cc.Class({
console
.
log
(
"
on collision exit
"
);
console
.
log
(
"
on collision exit
"
);
this
.
_isEnter
=
false
;
this
.
_isEnter
=
false
;
this
.
_isContact
=
false
;
this
.
_isContact
=
false
;
// this._soundOp = null;
},
},
// 播放声音
// 播放声音
...
...
This diff is collapsed.
Click to expand it.
play/assets/tmpGame/script/op_sound.js
View file @
0572104a
...
@@ -89,10 +89,10 @@ cc.Class({
...
@@ -89,10 +89,10 @@ cc.Class({
this
.
rightPic
.
node
.
height
=
height
;
this
.
rightPic
.
node
.
height
=
height
;
this
.
rightPic
.
spriteFrame
=
spriteFrame
;
this
.
rightPic
.
spriteFrame
=
spriteFrame
;
let
time
=
0.
1
;
let
time
=
0.
05
;
let
action
=
cc
.
repeat
(
let
action
=
cc
.
repeat
(
cc
.
sequence
(
cc
.
moveBy
(
time
,
-
10
,
0
),
cc
.
moveBy
(
time
,
10
,
0
),
cc
.
moveBy
(
time
,
10
,
0
),
cc
.
moveBy
(
time
,
-
10
,
0
)),
cc
.
sequence
(
cc
.
moveBy
(
time
,
-
10
,
0
),
cc
.
moveBy
(
time
,
10
,
0
),
cc
.
moveBy
(
time
,
10
,
0
),
cc
.
moveBy
(
time
,
-
10
,
0
)),
5
4
);
);
this
.
node
.
runAction
(
action
);
this
.
node
.
runAction
(
action
);
...
@@ -101,6 +101,6 @@ cc.Class({
...
@@ -101,6 +101,6 @@ cc.Class({
this
.
rightPic
.
spriteFrame
=
null
;
this
.
rightPic
.
spriteFrame
=
null
;
this
.
_opPic
.
node
.
active
=
true
;
this
.
_opPic
.
node
.
active
=
true
;
this
.
_opPic
.
node
.
getComponent
(
"
op_pic
"
).
resetPos
();
this
.
_opPic
.
node
.
getComponent
(
"
op_pic
"
).
resetPos
();
},
2
.2
);
},
1
.2
);
},
},
});
});
This diff is collapsed.
Click to expand it.
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