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
Nov 26, 2021
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节修改
parent
ca00bc71
Changes
7
Show 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 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 13
20
,
"height": 9
60
"width": 13
42
,
"height": 9
19
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -1377,7 +1377,7 @@
"__uuid__": "c9f7d5ba-b915-4205-b652-ff3a0db89faa"
},
"_type": 0,
"_sizeMode":
0
,
"_sizeMode":
1
,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
...
...
@@ -1397,7 +1397,7 @@
"node": {
"__id__": 29
},
"_enabled":
tru
e,
"_enabled":
fals
e,
"r_width": 1,
"r_height": 1,
"r_top": 0,
...
...
@@ -1405,7 +1405,7 @@
"p_left": 0,
"p_right": 0,
"p_top": 0,
"p_bottom":
0
,
"p_bottom":
1
,
"black": 0,
"noHead": 0,
"debug": 0,
...
...
@@ -1418,7 +1418,7 @@
"node": {
"__id__": 29
},
"_enabled":
tru
e,
"_enabled":
fals
e,
"alignMode": 1,
"_target": null,
"_alignFlags": 45,
...
...
@@ -1637,8 +1637,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 32
7
,
"height": 26
6
"width": 32
5
,
"height": 26
4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
play/assets/OPW25/scene/OPW25.js
View file @
266ee383
...
...
@@ -218,34 +218,42 @@ cc.Class({
onTouchAudio
(
touch
)
{
if
(
this
.
_gameCode
!=
0
)
return
resolve
(
''
);
if
(
!
this
.
_cantouch
)
return
;
this
.
_cantouch
=
false
;
//
this._cantouch = false;
let
item
=
touch
.
target
.
parent
;
this
.
playAudioAni
(
item
).
then
(()
=>
{
this
.
_cantouch
=
true
;
//
this._cantouch = true;
});
},
onTouchItem
(
touch
,
info
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
this
.
_gameCode
!=
0
)
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
;
if
(
this
.
_successItems
.
indexOf
(
item
)
>
-
1
)
return
resolve
(
''
);
let
data
=
item
.
data
;
this
.
_cantouch
=
false
;
//
this._cantouch = false;
if
(
data
.
right
)
{
this
.
catRight
();
pg
.
view
.
visible
(
pg
.
view
.
find
(
item
,
'
box
'
),
true
);
this
.
playSFX
(
"
audio_right
"
).
then
(()
=>
{
//audio 播放的时候动画播放, audio停的时候 动画正好能停下
//如果动画停的位置不对,直接强制设置对应的效果
//下一次播放没有问题即可
if
(
runId
!=
this
.
_runId
)
{
this
.
touchStep5
();
resolve
(
''
);
}
else
{
this
.
playAudioAni
(
item
).
then
(()
=>
{
this
.
_cantouch
=
true
;
this
.
_successItems
.
push
(
item
);
this
.
catNormal
();
this
.
groupEnd
();
this
.
touchStep5
();
resolve
(
''
);
})
}
});
}
else
{
this
.
catError
();
...
...
@@ -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
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
// var anim = pg.view.find(item, `audio`).getComponent(cc.Animation);
// anim.play();
let
items
=
this
.
_cardLayout
.
children
;
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
icon_1
=
pg
.
view
.
find
(
audio
,
"
icon_1
"
);
let
icon_2
=
pg
.
view
.
find
(
audio
,
"
icon_2
"
);
let
icon_3
=
pg
.
view
.
find
(
audio
,
"
icon_3
"
);
icon_1
.
active
=
true
;
//如果没有audio也要能正常走
pg
.
audio
.
playAudioByUrl
(
item
.
data
.
audio
).
then
(()
=>
{
// anim.stop();
cc
.
audioEngine
.
stopAll
();
// this.playUrlId && cc.audioEngine.stop(this.playUrlId);
pg
.
audio
.
playAudioByUrl
(
item
.
data
.
audio
).
then
((
audioId
)
=>
{
this
.
playUrlId
=
audioId
;
icon_1
.
active
=
false
;
resolve
(
''
);
});
...
...
play/assets/OPW25/scene/pg.js
View file @
266ee383
...
...
@@ -810,7 +810,7 @@ class AudioUtil {
cc
.
assetManager
.
loadRemote
(
audio_url
,
(
err
,
audioClip
)
=>
{
const
audioId
=
cc
.
audioEngine
.
play
(
audioClip
,
false
,
0.8
);
cc
.
audioEngine
.
setFinishCallback
(
audioId
,
()
=>
{
resolve
(
audio
Clip
);
resolve
(
audio
Id
);
});
});
});
...
...
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 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 13
3
2,
"height": 9
60
,
"width": 13
4
2,
"height": 9
19
,
"platformSettings": {},
"subMetas": {
"bg_1": {
...
...
@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 13
3
2,
"height": 9
60
,
"rawWidth": 13
3
2,
"rawHeight": 9
60
,
"width": 13
4
2,
"height": 9
19
,
"rawWidth": 13
4
2,
"rawHeight": 9
19
,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
...
...
play/assets/OPW25/textures/read/bg_pic-bg.png
View replaced file @
ca00bc71
View file @
266ee383
4.02 KB
|
W:
|
H:
3.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
play/assets/OPW25/textures/read/bg_pic-bg.png.meta
View file @
266ee383
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 32
7
,
"height": 26
6
,
"width": 32
5
,
"height": 26
4
,
"platformSettings": {},
"subMetas": {
"bg_pic-bg": {
...
...
@@ -22,10 +22,10 @@
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 32
7
,
"height": 26
6
,
"rawWidth": 32
7
,
"rawHeight": 26
6
,
"width": 32
5
,
"height": 26
4
,
"rawWidth": 32
5
,
"rawHeight": 26
4
,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
...
...
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