Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP52
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
OP52
Commits
95c93499
Commit
95c93499
authored
Jun 27, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
9f6aed56
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
419 additions
and
484 deletions
+419
-484
OP52.fire
assets/OP52/scene/OP52.fire
+360
-465
OP52.js
assets/OP52/scene/OP52.js
+48
-16
defaultData.js
assets/OP52/script/defaultData.js
+9
-1
form.component.html
form/src/app/form/form.component.html
+2
-2
No files found.
assets/OP52/scene/OP52.fire
View file @
95c93499
This diff is collapsed.
Click to expand it.
assets/OP52/scene/OP52.js
View file @
95c93499
...
@@ -570,11 +570,13 @@ cc.Class({
...
@@ -570,11 +570,13 @@ cc.Class({
pg
.
audio
.
playAudioByUrlCall
(
this
.
_stageData
.
sound
).
then
((
id
)
=>
{
pg
.
audio
.
playAudioByUrlCall
(
this
.
_stageData
.
sound
).
then
((
id
)
=>
{
audioFinished
=
true
;
audioFinished
=
true
;
let
time
=
cc
.
audioEngine
.
getDuration
(
id
);
let
time
=
cc
.
audioEngine
.
getDuration
(
id
);
this
.
showSliderAction
(
time
).
then
(()
=>
{
this
.
showCardAction
(
time
+
1
).
then
(()
=>
{
if
(
aniFinished
&&
audioFinished
)
{
this
.
showSliderAction
(
1
).
then
(()
=>
{
this
.
_playing
=
false
;
if
(
aniFinished
&&
audioFinished
)
{
resolve
(
''
);
this
.
_playing
=
false
;
}
resolve
(
''
);
}
});
});
});
})
})
}
else
{
}
else
{
...
@@ -594,14 +596,16 @@ cc.Class({
...
@@ -594,14 +596,16 @@ cc.Class({
pg
.
audio
.
playAudioByUrlCall
(
this
.
_stageData
.
sound
).
then
((
id
)
=>
{
pg
.
audio
.
playAudioByUrlCall
(
this
.
_stageData
.
sound
).
then
((
id
)
=>
{
audioFinished
=
true
;
audioFinished
=
true
;
let
time
=
cc
.
audioEngine
.
getDuration
(
id
);
let
time
=
cc
.
audioEngine
.
getDuration
(
id
);
this
.
showSliderAction
(
time
).
then
(()
=>
{
this
.
showCardAction
(
time
+
1
).
then
(()
=>
{
if
(
aniFinished
&&
audioFinished
)
{
this
.
showSliderAction
(
1
).
then
(()
=>
{
this
.
_playing
=
false
;
if
(
aniFinished
&&
audioFinished
)
{
resolve
(
''
);
this
.
_playing
=
false
;
}
resolve
(
''
);
});
}
});
})
})
})
},
1000
*
2
));
},
1000
));
}
}
});
});
},
},
...
@@ -696,7 +700,7 @@ cc.Class({
...
@@ -696,7 +700,7 @@ cc.Class({
slider
.
action
=
true
;
slider
.
action
=
true
;
layout_card
.
removeAllChildren
();
layout_card
.
removeAllChildren
();
layout_normal
.
removeAllChildren
();
layout_normal
.
removeAllChildren
();
layout_card
.
opacity
=
255
;
layout_card
.
opacity
=
1
;
layout_normal
.
opacity
=
0
;
layout_normal
.
opacity
=
0
;
let
r
=
[
239
,
0
,
135
];
let
r
=
[
239
,
0
,
135
];
let
l
=
[
2
,
171
,
241
];
let
l
=
[
2
,
171
,
241
];
...
@@ -731,11 +735,37 @@ cc.Class({
...
@@ -731,11 +735,37 @@ cc.Class({
laebl
.
active
=
true
;
laebl
.
active
=
true
;
}
}
})
})
layout_card
.
getComponent
(
cc
.
Layout
).
updateLayout
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
card_bg2
.
width
=
layout_card
.
width
;
let
size
=
this
.
node
.
width
;
let
lWidth
=
layout_card
.
width
;
if
(
lWidth
>
size
-
300
)
{
layout_card
.
scale
=
size
/
lWidth
-
0.05
;
}
layout_card
.
opacity
=
255
;
// card_bg2.width = layout_card.width;
},
60
);
},
60
);
},
},
showCardAction
(
time
)
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
let
layout_card
=
cc
.
find
(
"
card_group/layout_card
"
,
this
.
node
);
let
len
=
layout_card
.
children
.
length
let
content
=
this
.
_stageData
.
word
;
let
t
=
time
/
content
.
length
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
let
card
=
layout_card
.
children
[
i
];
if
(
card
.
name
==
"
add
"
)
continue
;
await
this
.
cardAction
(
card
,
t
);
}
return
resolve
(
""
)
});
},
cardAction
(
card
,
time
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
tween
(
card
).
to
(
time
/
2
,
{
scale
:
1.1
}).
to
(
time
/
2
,
{
scale
:
1
}).
call
(()
=>
{
return
resolve
(
""
)
}).
start
();
});
},
showSliderAction
(
time
)
{
showSliderAction
(
time
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
let
card_group
=
cc
.
find
(
"
card_group
"
,
this
.
node
);
let
card_group
=
cc
.
find
(
"
card_group
"
,
this
.
node
);
...
@@ -756,8 +786,10 @@ cc.Class({
...
@@ -756,8 +786,10 @@ cc.Class({
.
to
(
t
,
{
progress
:
0.9
}).
call
(()
=>
{
this
.
setCardColor
(
sl
.
progress
);
})
.
to
(
t
,
{
progress
:
0.9
}).
call
(()
=>
{
this
.
setCardColor
(
sl
.
progress
);
})
.
to
(
t
,
{
progress
:
1
}).
call
(()
=>
{
.
to
(
t
,
{
progress
:
1
}).
call
(()
=>
{
this
.
setCardColor
(
sl
.
progress
);
this
.
setCardColor
(
sl
.
progress
);
this
.
hideBox
();
this
.
_timeoutIds
.
push
(
setTimeout
(()
=>
{
return
resolve
(
""
)
this
.
hideBox
();
return
resolve
(
""
)
},
1000
))
})
})
.
start
();
.
start
();
});
});
...
...
assets/OP52/script/defaultData.js
View file @
95c93499
...
@@ -26,7 +26,15 @@ export const defaultData = {
...
@@ -26,7 +26,15 @@ export const defaultData = {
{
{
"
card
"
:
"
le
"
,
"
card
"
:
"
le
"
,
"
color
"
:
1
"
color
"
:
1
}
},
{
"
card
"
:
"
pp
"
,
"
color
"
:
1
},
{
"
card
"
:
"
le
"
,
"
color
"
:
1
},
],
],
"
bgImg
"
:
"
http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png
"
,
"
bgImg
"
:
"
http://staging-teach.cdn.ireadabc.com/97e19da9309e4e5aafca5ea2e9db8f46.png
"
,
"
wordAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3
"
,
"
wordAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/ab3538f7d4d57ac1abd740bd32f06b2d.mp3
"
,
...
...
form/src/app/form/form.component.html
View file @
95c93499
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
</div>
</div>
</div>
</div>
<div>
<
!-- <
div>
<div class="border">
<div class="border">
<div style="width: 100%; align-items:center;">
<div style="width: 100%; align-items:center;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
<div class="item-box" style="width: 50%;height:200px; margin-left: 25%; margin-top: 10%;">
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
-->
<!-- http://localhost:4200/?type=form
<!-- http://localhost:4200/?type=form
一组游戏
一组游戏
一个图片动画
一个图片动画
...
...
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