Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hy14_pipei
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
hy14_pipei
Commits
7e47d40f
Commit
7e47d40f
authored
Jul 17, 2023
by
yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
685c53aa
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
608 additions
and
600 deletions
+608
-600
Game_hy14_pipei.ts
assets/hy14_pipei/scene/Game_hy14_pipei.ts
+21
-8
hy14_pipei.fire
assets/hy14_pipei/scene/hy14_pipei.fire
+420
-452
hy14_pipei.ts
assets/hy14_pipei/scene/hy14_pipei.ts
+26
-17
pg_hy14_pipei.ts
assets/hy14_pipei/scene/pg_hy14_pipei.ts
+2
-2
defaultData_hy14_pipei.ts
assets/hy14_pipei/script/defaultData_hy14_pipei.ts
+139
-121
No files found.
assets/hy14_pipei/scene/Game_hy14_pipei.ts
View file @
7e47d40f
import
ImgVoice
from
"
../common/script/ImgVoice_hy14_pipei
"
;
import
ImgVoice
from
"
../common/script/ImgVoice_hy14_pipei
"
;
export
let
imageZize
=
{
export
let
imageZize
=
{
width
:
1
0
00
,
width
:
1
1
00
,
height
:
600
height
:
572
}
}
...
@@ -83,10 +83,12 @@ export default class Game {
...
@@ -83,10 +83,12 @@ export default class Game {
public
tipSwitch
:
any
;
public
tipSwitch
:
any
;
public
endImgTitle
:
any
;
public
endImgTitle
:
any
;
public
jumpIdx
:
any
;
public
jumpIdx
:
any
;
public
hotZoneItemArr
:
any
;
public
init
(
data
)
{
public
init
(
data
)
{
this
.
data
=
data
;
this
.
start
=
false
;
this
.
start
=
false
;
this
.
lists
=
[];
this
.
lists
=
[];
this
.
data
=
data
.
hotZoneItemArr
;
this
.
hotZoneItemArr
=
data
.
hotZoneItemArr
;
this
.
aniEnter
=
data
.
imgAni
;
this
.
aniEnter
=
data
.
imgAni
;
this
.
endImgAni
=
data
.
endImgAni
;
this
.
endImgAni
=
data
.
endImgAni
;
this
.
title
=
data
.
title
;
this
.
title
=
data
.
title
;
...
@@ -99,7 +101,7 @@ export default class Game {
...
@@ -99,7 +101,7 @@ export default class Game {
this
.
tipSwitch
=
data
.
tipSwitch
;
this
.
tipSwitch
=
data
.
tipSwitch
;
this
.
endImgTitle
=
data
.
endImgTitle
;
this
.
endImgTitle
=
data
.
endImgTitle
;
this
.
jumpIdx
=
data
.
jumpIdx
||
-
1
;
this
.
jumpIdx
=
data
.
jumpIdx
||
-
1
;
this
.
changepoints
(
data
);
// this.changepoints(
);
}
}
public
start
:
boolean
;
public
start
:
boolean
;
public
page
:
number
;
public
page
:
number
;
...
@@ -107,8 +109,8 @@ export default class Game {
...
@@ -107,8 +109,8 @@ export default class Game {
this
.
page
=
1
;
this
.
page
=
1
;
this
.
start
=
true
;
this
.
start
=
true
;
this
.
lists
=
[];
this
.
lists
=
[];
for
(
let
i
=
0
;
i
<
this
.
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
hotZoneItemArr
.
length
;
i
++
)
{
let
data
=
this
.
data
[
i
];
let
data
=
this
.
hotZoneItemArr
[
i
];
this
.
lists
.
push
(
new
ItemJigsaw
(
data
,
i
));
this
.
lists
.
push
(
new
ItemJigsaw
(
data
,
i
));
}
}
this
.
lists
.
sort
(
function
()
{
this
.
lists
.
sort
(
function
()
{
...
@@ -127,7 +129,18 @@ export default class Game {
...
@@ -127,7 +129,18 @@ export default class Game {
return
true
;
return
true
;
}
}
public
pointsArr
;
public
pointsArr
;
private
changepoints
(
data
)
{
public
changepoints
(
wh
:
any
)
{
let
data
=
this
.
data
;
if
(
wh
.
w
>
1150
)
{
imageZize
.
width
=
1150
;
let
sx
=
imageZize
.
width
/
wh
.
w
;
imageZize
.
height
=
wh
.
h
*
sx
;
}
else
{
imageZize
.
width
=
wh
.
w
;
imageZize
.
height
=
wh
.
h
;
}
let
scX
=
imageZize
.
width
/
data
.
bgItem
.
rect
.
width
;
let
scX
=
imageZize
.
width
/
data
.
bgItem
.
rect
.
width
;
let
scY
=
imageZize
.
height
/
data
.
bgItem
.
rect
.
height
;
let
scY
=
imageZize
.
height
/
data
.
bgItem
.
rect
.
height
;
let
px
=
data
.
bgItem
.
rect
.
x
;
let
px
=
data
.
bgItem
.
rect
.
x
;
...
@@ -192,7 +205,7 @@ export default class Game {
...
@@ -192,7 +205,7 @@ export default class Game {
return
this
.
page
>
this
.
lists
.
length
;
return
this
.
page
>
this
.
lists
.
length
;
}
}
get
opdata
()
{
get
opdata
()
{
return
this
.
data
;
return
this
.
hotZoneItemArr
;
}
}
}
}
...
...
assets/hy14_pipei/scene/hy14_pipei.fire
View file @
7e47d40f
This diff is collapsed.
Click to expand it.
assets/hy14_pipei/scene/hy14_pipei.ts
View file @
7e47d40f
...
@@ -86,8 +86,14 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -86,8 +86,14 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
this
.
cardBgs
=
[];
this
.
cardBgs
=
[];
//自动创建卡片
//自动创建卡片
let
itembg
=
cc
.
find
(
"
itembg
"
,
this
.
node
);
let
itembg
=
this
.
layout_sort
;
pg
.
view
.
setNetImg
(
itembg
,
Game
.
getIns
().
image
,
{
w
:
imageZize
.
width
,
h
:
imageZize
.
height
});
// let itembg = cc.find("itembg", this.node);
pg
.
view
.
setNetImg
(
itembg
,
Game
.
getIns
().
image
,
{
w
:
imageZize
.
width
,
h
:
imageZize
.
height
},
false
).
then
((
data
:
any
)
=>
{
Game
.
getIns
().
changepoints
(
data
);
itembg
.
width
=
imageZize
.
width
;
itembg
.
height
=
imageZize
.
height
;
this
.
creaetPosPic
();
});
this
.
createCrads
();
this
.
createCrads
();
}
}
...
@@ -135,21 +141,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -135,21 +141,7 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
createCrads
()
{
createCrads
()
{
this
.
layout_sort
.
removeAllChildren
();
this
.
layout_sort
.
removeAllChildren
();
let
pos
=
Game
.
getIns
().
pointsArr
;
pos
.
forEach
((
li
,
idx
)
=>
{
let
item
=
cc
.
instantiate
(
this
.
item
);
this
.
layout_sort
.
addChild
(
item
);
item
.
x
=
li
.
x
;
item
.
y
=
li
.
y
;
item
.
active
=
true
;
// let desc = cc.find("desc", item);
// desc.getComponent(cc.Label).string = li.text;
this
.
cardBgs
.
push
(
item
);
let
data
=
{
text
:
li
.
text
};
item
.
data
=
data
;
item
.
width
=
li
.
width
;
item
.
height
=
li
.
height
;
})
let
op
=
Game
.
getIns
().
opdata
;
let
op
=
Game
.
getIns
().
opdata
;
op
.
forEach
((
dt
,
idx
)
=>
{
op
.
forEach
((
dt
,
idx
)
=>
{
...
@@ -177,6 +169,23 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
...
@@ -177,6 +169,23 @@ export default class PuzzleJigsaw extends MyCocosSceneComponent {
})
})
cc
.
find
(
"
ScrollView
"
,
this
.
node
).
getComponent
(
cc
.
ScrollView
).
enabled
=
op
.
length
>
4
;
cc
.
find
(
"
ScrollView
"
,
this
.
node
).
getComponent
(
cc
.
ScrollView
).
enabled
=
op
.
length
>
4
;
}
}
private
creaetPosPic
()
{
let
pos
=
Game
.
getIns
().
pointsArr
;
pos
.
forEach
((
li
,
idx
)
=>
{
let
item
=
cc
.
instantiate
(
this
.
item
);
this
.
layout_sort
.
addChild
(
item
);
item
.
x
=
li
.
x
;
item
.
y
=
li
.
y
;
item
.
active
=
true
;
// let desc = cc.find("desc", item);
// desc.getComponent(cc.Label).string = li.text;
this
.
cardBgs
.
push
(
item
);
let
data
=
{
text
:
li
.
text
};
item
.
data
=
data
;
item
.
width
=
li
.
width
;
item
.
height
=
li
.
height
;
})
}
private
stSction
(
node
)
{
private
stSction
(
node
)
{
cc
.
tween
(
node
).
repeatForever
(
cc
.
tween
().
by
(
1
,
{
y
:
10
}).
by
(
1
,
{
y
:
-
10
})).
start
();
cc
.
tween
(
node
).
repeatForever
(
cc
.
tween
().
by
(
1
,
{
y
:
10
}).
by
(
1
,
{
y
:
-
10
})).
start
();
...
...
assets/hy14_pipei/scene/pg_hy14_pipei.ts
View file @
7e47d40f
...
@@ -262,8 +262,8 @@ let pg = {
...
@@ -262,8 +262,8 @@ let pg = {
let
scaleX
=
w
/
nw
;
let
scaleX
=
w
/
nw
;
let
scaleY
=
h
/
nh
;
let
scaleY
=
h
/
nh
;
let
scale
=
scaleX
<=
scaleY
?
scaleX
:
scaleY
;
let
scale
=
scaleX
<=
scaleY
?
scaleX
:
scaleY
;
node
.
width
=
nw
*
scale
;
node
.
width
=
nw
*
scale
X
;
node
.
height
=
nh
*
scale
;
node
.
height
=
nh
*
scale
Y
;
}
}
node
.
active
=
true
;
node
.
active
=
true
;
resolve
({
w
:
nw
,
h
:
nh
});
resolve
({
w
:
nw
,
h
:
nh
});
...
...
assets/hy14_pipei/script/defaultData_hy14_pipei.ts
View file @
7e47d40f
...
@@ -3,20 +3,19 @@ export const defaultData = {
...
@@ -3,20 +3,19 @@ export const defaultData = {
"
questionScore
"
:
0
,
"
questionScore
"
:
0
,
"
questions
"
:
[],
"
questions
"
:
[],
"
bgItem
"
:
{
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/933163fae966edff0633a0bb97e5c5bc.jp
g
"
,
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/bf9f3958a388f3e10e79f50ab786f5ef.pn
g
"
,
"
rect
"
:
{
"
rect
"
:
{
"
x
"
:
0
,
"
x
"
:
0
,
"
y
"
:
85.66
,
"
y
"
:
42.52
,
"
width
"
:
902
,
"
width
"
:
902
,
"
height
"
:
469.69
"
height
"
:
424.95
}
}
},
},
"
hotZoneItemArr
"
:
[
"
hotZoneItemArr
"
:
[
{
{
"
id
"
:
"
1687750651003
"
,
"
id
"
:
"
1689504307224
"
,
"
index
"
:
0
,
"
index
"
:
0
,
"
text
"
:
"
high collar
"
,
"
text
"
:
"
the blue and green face
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/81c8ea51c42136db0fd61e78c38de7c9_l.mp3
"
,
"
itemType
"
:
"
text
"
,
"
itemType
"
:
"
text
"
,
"
fontScale
"
:
0.7046875
,
"
fontScale
"
:
0.7046875
,
"
imgScale
"
:
1
,
"
imgScale
"
:
1
,
...
@@ -25,24 +24,23 @@ export const defaultData = {
...
@@ -25,24 +24,23 @@ export const defaultData = {
"
mapScale
"
:
0.7046875
,
"
mapScale
"
:
0.7046875
,
"
dragDot
"
:
{
"
dragDot
"
:
{
"
x
"
:
451
,
"
x
"
:
451
,
"
y
"
:
297
"
y
"
:
255.00000000000003
},
},
"
gIdx
"
:
"
0
"
,
"
gIdx
"
:
"
0
"
,
"
fontSize
"
:
50
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
ahronbd-1
"
,
"
fontName
"
:
"
ahronbd-1
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
rect
"
:
{
"
rect
"
:
{
"
width
"
:
169.77
,
"
width
"
:
390.95
,
"
height
"
:
35.23
,
"
height
"
:
35.23
,
"
x
"
:
36.11
,
"
x
"
:
56.53
,
"
y
"
:
65.19
"
y
"
:
44.86
}
}
},
},
{
{
"
id
"
:
"
1687750664688
"
,
"
id
"
:
"
1689504345672
"
,
"
index
"
:
1
,
"
index
"
:
1
,
"
text
"
:
"
low collar
"
,
"
text
"
:
"
the gold face
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/9de7c90341afc24bcd2a311f4d554bdc_l.mp3
"
,
"
itemType
"
:
"
text
"
,
"
itemType
"
:
"
text
"
,
"
fontScale
"
:
0.7046875
,
"
fontScale
"
:
0.7046875
,
"
imgScale
"
:
1
,
"
imgScale
"
:
1
,
...
@@ -51,24 +49,23 @@ export const defaultData = {
...
@@ -51,24 +49,23 @@ export const defaultData = {
"
mapScale
"
:
0.7046875
,
"
mapScale
"
:
0.7046875
,
"
dragDot
"
:
{
"
dragDot
"
:
{
"
x
"
:
451
,
"
x
"
:
451
,
"
y
"
:
297
"
y
"
:
255.00000000000003
},
},
"
gIdx
"
:
"
0
"
,
"
gIdx
"
:
"
0
"
,
"
fontSize
"
:
50
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
ahronbd-1
"
,
"
fontName
"
:
"
ahronbd-1
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
rect
"
:
{
"
rect
"
:
{
"
width
"
:
156.28
,
"
width
"
:
217.16
,
"
height
"
:
35.23
,
"
height
"
:
35.23
,
"
x
"
:
467.86
,
"
x
"
:
118.42
,
"
y
"
:
100.19
"
y
"
:
193.86
}
}
},
},
{
{
"
id
"
:
"
168775069933
5
"
,
"
id
"
:
"
168950436575
5
"
,
"
index
"
:
2
,
"
index
"
:
2
,
"
text
"
:
"
long sleeve
"
,
"
text
"
:
"
the black face
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/7474d2ea3660833373b9d3dfb2ad9d07_l.mp3
"
,
"
itemType
"
:
"
text
"
,
"
itemType
"
:
"
text
"
,
"
fontScale
"
:
0.7046875
,
"
fontScale
"
:
0.7046875
,
"
imgScale
"
:
1
,
"
imgScale
"
:
1
,
...
@@ -77,24 +74,23 @@ export const defaultData = {
...
@@ -77,24 +74,23 @@ export const defaultData = {
"
mapScale
"
:
0.7046875
,
"
mapScale
"
:
0.7046875
,
"
dragDot
"
:
{
"
dragDot
"
:
{
"
x
"
:
451
,
"
x
"
:
451
,
"
y
"
:
297
"
y
"
:
255.00000000000003
},
},
"
gIdx
"
:
"
0
"
,
"
gIdx
"
:
"
0
"
,
"
fontSize
"
:
50
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
ahronbd-1
"
,
"
fontName
"
:
"
ahronbd-1
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
rect
"
:
{
"
rect
"
:
{
"
width
"
:
182.88
,
"
width
"
:
233.29
,
"
height
"
:
35.23
,
"
height
"
:
35.23
,
"
x
"
:
13.56
,
"
x
"
:
116.35
,
"
y
"
:
193.19
"
y
"
:
341.86
}
}
},
},
{
{
"
id
"
:
"
1687750716437
"
,
"
id
"
:
"
1689504375545
"
,
"
index
"
:
3
,
"
index
"
:
3
,
"
text
"
:
"
short sleeve
"
,
"
text
"
:
"
the red face
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/172fad3743476ac9c668eb8a82d5eca1_l.mp3
"
,
"
itemType
"
:
"
text
"
,
"
itemType
"
:
"
text
"
,
"
fontScale
"
:
0.7046875
,
"
fontScale
"
:
0.7046875
,
"
imgScale
"
:
1
,
"
imgScale
"
:
1
,
...
@@ -103,26 +99,48 @@ export const defaultData = {
...
@@ -103,26 +99,48 @@ export const defaultData = {
"
mapScale
"
:
0.7046875
,
"
mapScale
"
:
0.7046875
,
"
dragDot
"
:
{
"
dragDot
"
:
{
"
x
"
:
451
,
"
x
"
:
451
,
"
y
"
:
297
"
y
"
:
255.00000000000003
},
},
"
gIdx
"
:
"
0
"
,
"
gIdx
"
:
"
0
"
,
"
fontSize
"
:
50
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
ahronbd-1
"
,
"
fontName
"
:
"
ahronbd-1
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
rect
"
:
{
"
rect
"
:
{
"
width
"
:
196.83
,
"
width
"
:
199.82
,
"
height
"
:
35.23
,
"
height
"
:
35.23
,
"
x
"
:
462.5
9
,
"
x
"
:
569.0
9
,
"
y
"
:
186.19
"
y
"
:
81.86
}
}
},
{
"
id
"
:
"
1689504389861
"
,
"
index
"
:
4
,
"
text
"
:
"
the white face
"
,
"
itemType
"
:
"
text
"
,
"
fontScale
"
:
0.7046875
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.7046875
,
"
dragDot
"
:
{
"
x
"
:
451
,
"
y
"
:
255.00000000000003
},
"
gIdx
"
:
"
0
"
,
"
fontSize
"
:
50
,
"
fontName
"
:
"
ahronbd-1
"
,
"
ontColor
"
:
"
#8f3758
"
,
"
rect
"
:
{
"
width
"
:
234.03
,
"
height
"
:
35.23
,
"
x
"
:
549.98
,
"
y
"
:
301.86
}
}
],
"
questionText
"
:
""
,
"
npcTitle
"
:
"
Mind Map
"
,
"
npcAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/840c5d814e82b8dbc869d7523d592869_l.mp3
"
,
"
npcAudioName
"
:
"
HY14位置匹配-将单词拖动到正确的位置.mp3
"
}
}
],
"
npcTitle
"
:
"
HY14
"
,
"
npcAudio
"
:
""
,
// "npcAudio": "http://staging-teach.cdn.ireadabc.com/840c5d814e82b8dbc869d7523d592869_l.mp3",
"
npcAudioName
"
:
"
HY14位置匹配-将单词拖动到正确的位置.mp3
"
,
"
questionText
"
:
""
}
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