Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_11
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
JJ_Game_11
Commits
d1cbf2c1
Commit
d1cbf2c1
authored
Dec 26, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
22dab672
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
6 deletions
+46
-6
.DS_Store
.DS_Store
+0
-0
JJ_Game_11.fire
assets/JJ_Game_11/scene/JJ_Game_11.fire
+2
-2
JJ_Game_11.js
assets/JJ_Game_11/script/JJ_Game_11.js
+28
-1
util_JJ_Game_11.js
assets/JJ_Game_11/script/util_JJ_Game_11.js
+11
-0
btn_left.png.meta
assets/JJ_Game_11/texture/btn_left.png.meta
+1
-1
btn_right.png.meta
assets/JJ_Game_11/texture/btn_right.png.meta
+1
-1
form.component.ts
form/src/app/form/form.component.ts
+1
-0
project.json
project.json
+2
-1
No files found.
.DS_Store
View file @
d1cbf2c1
No preview for this file type
assets/JJ_Game_11/scene/JJ_Game_11.fire
View file @
d1cbf2c1
...
@@ -447,7 +447,7 @@
...
@@ -447,7 +447,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "bbc0c425-e225-4ca1-8856-8e92a7bf7b7c"
"__uuid__": "bbc0c425-e225-4ca1-8856-8e92a7bf7b7c"
...
@@ -541,7 +541,7 @@
...
@@ -541,7 +541,7 @@
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
}
],
],
"_srcBlendFactor":
770
,
"_srcBlendFactor":
1
,
"_dstBlendFactor": 771,
"_dstBlendFactor": 771,
"_spriteFrame": {
"_spriteFrame": {
"__uuid__": "ce9855f3-2ba9-4e0e-becb-01fc0ea67b37"
"__uuid__": "ce9855f3-2ba9-4e0e-becb-01fc0ea67b37"
...
...
assets/JJ_Game_11/script/JJ_Game_11.js
View file @
d1cbf2c1
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
// import { getSprNode } from "./util";
// import { getSprNode } from "./util";
import
{
getSprNode
,
playAudioByUrl
,
getScaleRateBy2Node
,
localPosTolocalPos
,
randomSortByArr
,
loadDragonBones
,
playAudio
,
showTrebleFirework
,
delayCall
,
removeFromArr
,
showBtnAnima
,
asyncDelay
,
RandomInt
,
jellyShake
,
getSprNodeByUrl
}
from
"
./util_JJ_Game_11
"
;
import
{
getSprNode
,
playAudioByUrl
,
getScaleRateBy2Node
,
localPosTolocalPos
,
randomSortByArr
,
loadDragonBones
,
playAudio
,
showTrebleFirework
,
delayCall
,
removeFromArr
,
showBtnAnima
,
asyncDelay
,
RandomInt
,
jellyShake
,
getSprNodeByUrl
,
onHomeworkFinish
}
from
"
./util_JJ_Game_11
"
;
cc
.
Class
({
cc
.
Class
({
extends
:
cc
.
Component
,
extends
:
cc
.
Component
,
...
@@ -151,6 +151,8 @@ cc.Class({
...
@@ -151,6 +151,8 @@ cc.Class({
},
},
getDefaultData
()
{
getDefaultData
()
{
return
{
"
contentObj
"
:{
"
picArr
"
:[{
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/d85807707eb160c82ffb4b03d3e61e8a.png
"
,
"
article
"
:
"
aaaa
"
},{
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/a89555eee603cb808bc951ec3eaac592.png
"
,
"
article
"
:
"
bbbb
"
},{
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e1cccc2138b3db39825f0a5061ec8c7e.jpeg
"
,
"
article
"
:
"
cccc
"
}]}}
const
dataJson
=
'
{ "contentObj": { "picArr": [ { "pic_url": "http://teach.cdn.ireadabc.com/a5c41f34559575ce7f9e340a2e458dc8.png", "article": "" } ] } }
'
;
const
dataJson
=
'
{ "contentObj": { "picArr": [ { "pic_url": "http://teach.cdn.ireadabc.com/a5c41f34559575ce7f9e340a2e458dc8.png", "article": "" } ] } }
'
;
const
data1
=
JSON
.
parse
(
dataJson
);
const
data1
=
JSON
.
parse
(
dataJson
);
return
data1
;
return
data1
;
...
@@ -254,6 +256,7 @@ cc.Class({
...
@@ -254,6 +256,7 @@ cc.Class({
curPageIndex
:
null
,
curPageIndex
:
null
,
stopPlayBgAudio
:
null
,
stopPlayBgAudio
:
null
,
canTouch
:
null
,
canTouch
:
null
,
finishData
:
null
,
initData
()
{
initData
()
{
...
@@ -266,6 +269,8 @@ cc.Class({
...
@@ -266,6 +269,8 @@ cc.Class({
this
.
canvasWidth
=
this
.
canvas
.
width
;
this
.
canvasWidth
=
this
.
canvas
.
width
;
this
.
canvasHeight
=
this
.
canvas
.
height
;
this
.
canvasHeight
=
this
.
canvas
.
height
;
this
.
finishData
=
{};
this
.
initAudioEffect
();
this
.
initAudioEffect
();
},
},
...
@@ -605,8 +610,30 @@ cc.Class({
...
@@ -605,8 +610,30 @@ cc.Class({
label
.
string
=
(
this
.
curPageIndex
+
1
)
+
'
/
'
+
this
.
picArr
.
length
;
label
.
string
=
(
this
.
curPageIndex
+
1
)
+
'
/
'
+
this
.
picArr
.
length
;
this
.
showAudio
();
this
.
showAudio
();
this
.
finishData
[
this
.
curPageIndex
.
toString
()]
=
true
;
this
.
checkGameEnd
();
},
},
isGameEnd
:
null
,
checkGameEnd
()
{
if
(
this
.
isGameEnd
)
{
return
;
}
// 获取finishData的长度
const
finishLen
=
Object
.
keys
(
this
.
finishData
).
length
;
console
.
log
(
'
end length:
'
,
finishLen
);
if
(
finishLen
>=
this
.
picArr
.
length
)
{
console
.
log
(
'
game end
'
);
this
.
isGameEnd
=
true
;
onHomeworkFinish
();
}
},
showAudio
()
{
showAudio
()
{
if
(
!
this
.
stopPlayBgAudio
)
{
if
(
!
this
.
stopPlayBgAudio
)
{
this
.
playPageAudio
();
this
.
playPageAudio
();
...
...
assets/JJ_Game_11/script/util_JJ_Game_11.js
View file @
d1cbf2c1
...
@@ -338,4 +338,15 @@ export function jellyShake(node) {
...
@@ -338,4 +338,15 @@ export function jellyShake(node) {
.
to
(
time
/
5
,
{
scaleX
:
baseS
*
1.02
,
scaleY
:
baseS
*
0.98
},
{
easing
:
"
sineInOut
"
})
.
to
(
time
/
5
,
{
scaleX
:
baseS
*
1.02
,
scaleY
:
baseS
*
0.98
},
{
easing
:
"
sineInOut
"
})
.
to
(
time
/
5
,
{
scaleX
:
baseS
*
1
,
scaleY
:
baseS
*
1
},
{
easing
:
"
sineInOut
"
})
.
to
(
time
/
5
,
{
scaleX
:
baseS
*
1
,
scaleY
:
baseS
*
1
},
{
easing
:
"
sineInOut
"
})
.
start
();
.
start
();
}
export
function
onHomeworkFinish
(
data
=
""
,
callback
=
()
=>
{})
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
middleLayerComponent
.
onHomeworkFinish
(
callback
,
data
);
}
else
{
console
.
log
(
'
onHomeworkFinish
'
,
JSON
.
stringify
(
data
));
}
}
}
\ No newline at end of file
assets/JJ_Game_11/texture/btn_left.png.meta
View file @
d1cbf2c1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"type": "sprite",
"type": "sprite",
"wrapMode": "clamp",
"wrapMode": "clamp",
"filterMode": "bilinear",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width": 61,
"width": 61,
...
...
assets/JJ_Game_11/texture/btn_right.png.meta
View file @
d1cbf2c1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"type": "sprite",
"type": "sprite",
"wrapMode": "clamp",
"wrapMode": "clamp",
"filterMode": "bilinear",
"filterMode": "bilinear",
"premultiplyAlpha":
fals
e,
"premultiplyAlpha":
tru
e,
"genMipmaps": false,
"genMipmaps": false,
"packable": true,
"packable": true,
"width": 61,
"width": 61,
...
...
form/src/app/form/form.component.ts
View file @
d1cbf2c1
...
@@ -169,6 +169,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -169,6 +169,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
save
()
{
save
()
{
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
KEY
);
(
<
any
>
window
).
courseware
.
setData
(
this
.
item
,
null
,
this
.
KEY
);
this
.
refresh
();
this
.
refresh
();
console
.
log
(
JSON
.
stringify
(
this
.
item
));
}
}
refresh
()
{
refresh
()
{
...
...
project.json
View file @
d1cbf2c1
...
@@ -4,5 +4,6 @@
...
@@ -4,5 +4,6 @@
"name"
:
"play"
,
"name"
:
"play"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"id"
:
"9af72fd2-44a6-4131-8ea3-3e1b3fa22231"
,
"version"
:
"2.4.5"
,
"version"
:
"2.4.5"
,
"isNew"
:
false
"isNew"
:
false
,
"description"
:
""
}
}
\ No newline at end of file
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