Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OPW25
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
OPW25
Commits
266ee383
Commit
266ee383
authored
3 years ago
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节修改
parent
ca00bc71
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
37 deletions
+58
-37
OPW25.fire
play/assets/OPW25/scene/OPW25.fire
+8
-8
OPW25.js
play/assets/OPW25/scene/OPW25.js
+37
-16
pg.js
play/assets/OPW25/scene/pg.js
+1
-1
bg_1.png
play/assets/OPW25/textures/read/bg_1.png
+0
-0
bg_1.png.meta
play/assets/OPW25/textures/read/bg_1.png.meta
+6
-6
bg_pic-bg.png
play/assets/OPW25/textures/read/bg_pic-bg.png
+0
-0
bg_pic-bg.png.meta
play/assets/OPW25/textures/read/bg_pic-bg.png.meta
+6
-6
No files found.
play/assets/OPW25/scene/OPW25.fire
View file @
266ee383
...
@@ -1321,8 +1321,8 @@
...
@@ -1321,8 +1321,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 13
20
,
"width": 13
42
,
"height": 9
60
"height": 9
19
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1377,7 +1377,7 @@
...
@@ -1377,7 +1377,7 @@
"__uuid__": "c9f7d5ba-b915-4205-b652-ff3a0db89faa"
"__uuid__": "c9f7d5ba-b915-4205-b652-ff3a0db89faa"
},
},
"_type": 0,
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillType": 0,
"_fillCenter": {
"_fillCenter": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -1397,7 +1397,7 @@
...
@@ -1397,7 +1397,7 @@
"node": {
"node": {
"__id__": 29
"__id__": 29
},
},
"_enabled":
tru
e,
"_enabled":
fals
e,
"r_width": 1,
"r_width": 1,
"r_height": 1,
"r_height": 1,
"r_top": 0,
"r_top": 0,
...
@@ -1405,7 +1405,7 @@
...
@@ -1405,7 +1405,7 @@
"p_left": 0,
"p_left": 0,
"p_right": 0,
"p_right": 0,
"p_top": 0,
"p_top": 0,
"p_bottom":
0
,
"p_bottom":
1
,
"black": 0,
"black": 0,
"noHead": 0,
"noHead": 0,
"debug": 0,
"debug": 0,
...
@@ -1418,7 +1418,7 @@
...
@@ -1418,7 +1418,7 @@
"node": {
"node": {
"__id__": 29
"__id__": 29
},
},
"_enabled":
tru
e,
"_enabled":
fals
e,
"alignMode": 1,
"alignMode": 1,
"_target": null,
"_target": null,
"_alignFlags": 45,
"_alignFlags": 45,
...
@@ -1637,8 +1637,8 @@
...
@@ -1637,8 +1637,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 32
7
,
"width": 32
5
,
"height": 26
6
"height": 26
4
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
...
This diff is collapsed.
Click to expand it.
play/assets/OPW25/scene/OPW25.js
View file @
266ee383
...
@@ -218,34 +218,42 @@ cc.Class({
...
@@ -218,34 +218,42 @@ cc.Class({
onTouchAudio
(
touch
)
{
onTouchAudio
(
touch
)
{
if
(
this
.
_gameCode
!=
0
)
return
resolve
(
''
);
if
(
this
.
_gameCode
!=
0
)
return
resolve
(
''
);
if
(
!
this
.
_cantouch
)
return
;
if
(
!
this
.
_cantouch
)
return
;
this
.
_cantouch
=
false
;
//
this._cantouch = false;
let
item
=
touch
.
target
.
parent
;
let
item
=
touch
.
target
.
parent
;
this
.
playAudioAni
(
item
).
then
(()
=>
{
this
.
playAudioAni
(
item
).
then
(()
=>
{
this
.
_cantouch
=
true
;
//
this._cantouch = true;
});
});
},
},
onTouchItem
(
touch
,
info
)
{
onTouchItem
(
touch
,
info
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
this
.
_gameCode
!=
0
)
return
resolve
(
''
);
if
(
this
.
_gameCode
!=
0
)
return
resolve
(
''
);
if
(
!
this
.
_cantouch
)
return
resolve
(
''
);
if
(
!
this
.
_cantouch
)
return
resolve
(
''
);
if
(
this
.
_runId
)
{
//执行中断并直接完成
}
if
(
!
this
.
_runId
)
{
this
.
_runId
=
Math
.
random
()
*
1000000000
;
}
else
{
this
.
_runId
++
;
}
let
runId
=
this
.
_runId
;
let
item
=
touch
.
target
;
let
item
=
touch
.
target
;
if
(
this
.
_successItems
.
indexOf
(
item
)
>
-
1
)
return
resolve
(
''
);
if
(
this
.
_successItems
.
indexOf
(
item
)
>
-
1
)
return
resolve
(
''
);
let
data
=
item
.
data
;
let
data
=
item
.
data
;
this
.
_cantouch
=
false
;
//
this._cantouch = false;
if
(
data
.
right
)
{
if
(
data
.
right
)
{
this
.
catRight
();
this
.
catRight
();
pg
.
view
.
visible
(
pg
.
view
.
find
(
item
,
'
box
'
),
true
);
pg
.
view
.
visible
(
pg
.
view
.
find
(
item
,
'
box
'
),
true
);
this
.
playSFX
(
"
audio_right
"
).
then
(()
=>
{
this
.
playSFX
(
"
audio_right
"
).
then
(()
=>
{
//audio 播放的时候动画播放, audio停的时候 动画正好能停下
if
(
runId
!=
this
.
_runId
)
{
//如果动画停的位置不对,直接强制设置对应的效果
this
.
touchStep5
();
//下一次播放没有问题即可
this
.
playAudioAni
(
item
).
then
(()
=>
{
this
.
_cantouch
=
true
;
this
.
_successItems
.
push
(
item
);
this
.
catNormal
();
this
.
groupEnd
();
resolve
(
''
);
resolve
(
''
);
})
}
else
{
this
.
playAudioAni
(
item
).
then
(()
=>
{
this
.
touchStep5
();
resolve
(
''
);
})
}
});
});
}
else
{
}
else
{
this
.
catError
();
this
.
catError
();
...
@@ -262,18 +270,31 @@ cc.Class({
...
@@ -262,18 +270,31 @@ cc.Class({
});
});
},
},
touchStep5
(
item
)
{
this
.
catNormal
();
if
(
this
.
_successItems
.
every
(
it
=>
it
.
id
!=
item
.
id
))
{
this
.
_successItems
.
push
(
item
);
}
this
.
groupEnd
();
},
playAudioAni
(
item
)
{
playAudioAni
(
item
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// var anim = pg.view.find(item, `audio`).getComponent(cc.Animation);
let
items
=
this
.
_cardLayout
.
children
;
// anim.play();
items
.
forEach
(
it
=>
{
let
audio
=
pg
.
view
.
find
(
it
,
`audio`
);
let
icon_1
=
pg
.
view
.
find
(
audio
,
"
icon_1
"
);
icon_1
.
active
=
false
;
})
let
audio
=
pg
.
view
.
find
(
item
,
`audio`
);
let
audio
=
pg
.
view
.
find
(
item
,
`audio`
);
let
icon_1
=
pg
.
view
.
find
(
audio
,
"
icon_1
"
);
let
icon_1
=
pg
.
view
.
find
(
audio
,
"
icon_1
"
);
let
icon_2
=
pg
.
view
.
find
(
audio
,
"
icon_2
"
);
let
icon_2
=
pg
.
view
.
find
(
audio
,
"
icon_2
"
);
let
icon_3
=
pg
.
view
.
find
(
audio
,
"
icon_3
"
);
let
icon_3
=
pg
.
view
.
find
(
audio
,
"
icon_3
"
);
icon_1
.
active
=
true
;
icon_1
.
active
=
true
;
//如果没有audio也要能正常走
//如果没有audio也要能正常走
pg
.
audio
.
playAudioByUrl
(
item
.
data
.
audio
).
then
(()
=>
{
cc
.
audioEngine
.
stopAll
();
// anim.stop();
// this.playUrlId && cc.audioEngine.stop(this.playUrlId);
pg
.
audio
.
playAudioByUrl
(
item
.
data
.
audio
).
then
((
audioId
)
=>
{
this
.
playUrlId
=
audioId
;
icon_1
.
active
=
false
;
icon_1
.
active
=
false
;
resolve
(
''
);
resolve
(
''
);
});
});
...
...
This diff is collapsed.
Click to expand it.
play/assets/OPW25/scene/pg.js
View file @
266ee383
...
@@ -810,7 +810,7 @@ class AudioUtil {
...
@@ -810,7 +810,7 @@ class AudioUtil {
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
resolve
(
audio
Clip
);
resolve
(
audio
Id
);
});
});
});
});
});
});
...
...
This diff is collapsed.
Click to expand it.
play/assets/OPW25/textures/read/bg_1.png
View replaced file @
ca00bc71
View file @
266ee383
This diff is collapsed.
Click to expand it.
play/assets/OPW25/textures/read/bg_1.png.meta
View file @
266ee383
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"premultiplyAlpha": false,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width": 13
3
2,
"width": 13
4
2,
"height": 9
60
,
"height": 9
19
,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"bg_1": {
"bg_1": {
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
"offsetY": 0,
"offsetY": 0,
"trimX": 0,
"trimX": 0,
"trimY": 0,
"trimY": 0,
"width": 13
3
2,
"width": 13
4
2,
"height": 9
60
,
"height": 9
19
,
"rawWidth": 13
3
2,
"rawWidth": 13
4
2,
"rawHeight": 9
60
,
"rawHeight": 9
19
,
"borderTop": 0,
"borderTop": 0,
"borderBottom": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderLeft": 0,
...
...
This diff is collapsed.
Click to expand it.
play/assets/OPW25/textures/read/bg_pic-bg.png
View replaced file @
ca00bc71
View file @
266ee383
4.02 KB
|
W:
0px
|
H:
0px
3.7 KB
|
W:
0px
|
H:
0px
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
play/assets/OPW25/textures/read/bg_pic-bg.png.meta
View file @
266ee383
...
@@ -7,8 +7,8 @@
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"premultiplyAlpha": false,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width": 32
7
,
"width": 32
5
,
"height": 26
6
,
"height": 26
4
,
"platformSettings": {},
"platformSettings": {},
"subMetas": {
"subMetas": {
"bg_pic-bg": {
"bg_pic-bg": {
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
"offsetY": 0,
"offsetY": 0,
"trimX": 0,
"trimX": 0,
"trimY": 0,
"trimY": 0,
"width": 32
7
,
"width": 32
5
,
"height": 26
6
,
"height": 26
4
,
"rawWidth": 32
7
,
"rawWidth": 32
5
,
"rawHeight": 26
6
,
"rawHeight": 26
4
,
"borderTop": 0,
"borderTop": 0,
"borderBottom": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderLeft": 0,
...
...
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