Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Z_04_syys
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
Z_04_syys
Commits
786a9bc9
Commit
786a9bc9
authored
Aug 19, 2020
by
huoshizhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bugs
parent
70ec82ca
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1158 additions
and
3610 deletions
+1158
-3610
form.component.html
form/src/app/form/form.component.html
+5
-7
NodeShell.prefab
play/assets/z_04_syys/prefabs/NodeShell.prefab
+745
-0
NodeShell.prefab.meta
play/assets/z_04_syys/prefabs/NodeShell.prefab.meta
+8
-0
syys.fire
play/assets/z_04_syys/scene/syys.fire
+290
-3585
syys.js
play/assets/z_04_syys/scene/syys.js
+37
-14
defaultData.js
play/assets/z_04_syys/script/defaultData.js
+15
-0
bg_bg.png.meta
play/assets/z_04_syys/textures/bg_bg.png.meta
+2
-2
bg_tree.png.meta
play/assets/z_04_syys/textures/bg_tree.png.meta
+2
-2
builder.json
play/settings/builder.json
+54
-0
No files found.
form/src/app/form/form.component.html
View file @
786a9bc9
...
@@ -24,7 +24,6 @@
...
@@ -24,7 +24,6 @@
</button>
</button>
</div>
</div>
</div>
</div>
<div
*
ngIf=
"(item.wordList.length < 5)"
>
<div
class=
"border"
style=
"width: 430px; height: 100px;"
>
<div
class=
"border"
style=
"width: 430px; height: 100px;"
>
<button
style=
"height: 55px; width: 385px;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
createShell
()"
>
<button
style=
"height: 55px; width: 385px;"
nz-button
nzType=
"dashed"
class=
"add-btn"
(
click
)="
createShell
()"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
...
@@ -32,7 +31,6 @@
...
@@ -32,7 +31,6 @@
</button>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="border" style=" width: 520px; height: 120px;">
<!-- <div class="border" style=" width: 520px; height: 120px;">
<span style="height: 30px; font-size: 18px;">单词音频:</span>
<span style="height: 30px; font-size: 18px;">单词音频:</span>
<br>
<br>
...
...
play/assets/z_04_syys/prefabs/NodeShell.prefab
0 → 100644
View file @
786a9bc9
This diff is collapsed.
Click to expand it.
play/assets/z_04_syys/prefabs/NodeShell.prefab.meta
0 → 100644
View file @
786a9bc9
{
"ver": "1.2.7",
"uuid": "82b173cf-75c4-4b54-8143-01df312ee386",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
play/assets/z_04_syys/scene/syys.fire
View file @
786a9bc9
This diff is collapsed.
Click to expand it.
play/assets/z_04_syys/scene/syys.js
View file @
786a9bc9
...
@@ -27,6 +27,11 @@ cc.Class({
...
@@ -27,6 +27,11 @@ cc.Class({
type
:
cc
.
Prefab
,
type
:
cc
.
Prefab
,
default
:
null
,
default
:
null
,
},
},
shellPrefab
:
{
type
:
cc
.
Prefab
,
default
:
null
,
},
},
},
ctor
()
{
ctor
()
{
...
@@ -35,7 +40,6 @@ cc.Class({
...
@@ -35,7 +40,6 @@ cc.Class({
this
.
_status
=
{
this
.
_status
=
{
treeHeight
:
-
1
,
treeHeight
:
-
1
,
}
}
this
.
_maxTreeHeight
=
5
;
},
},
start
()
{
start
()
{
...
@@ -94,6 +98,7 @@ cc.Class({
...
@@ -94,6 +98,7 @@ cc.Class({
hideAirClassLoading
()
{
hideAirClassLoading
()
{
if
(
window
&&
window
[
"
air
"
])
{
if
(
window
&&
window
[
"
air
"
])
{
window
[
"
air
"
].
hideAirClassLoading
();
window
[
"
air
"
].
hideAirClassLoading
();
console
.
log
(
'
hideAirClassLoading
'
);
}
}
},
},
...
@@ -146,7 +151,6 @@ cc.Class({
...
@@ -146,7 +151,6 @@ cc.Class({
cc
.
tween
(
nodeCharacterBase
)
cc
.
tween
(
nodeCharacterBase
)
.
delay
(
1.5
)
.
delay
(
1.5
)
.
call
(()
=>
{
.
call
(()
=>
{
this
.
playEffect
(
'
植物
'
);
this
.
showTree
(
0
);
this
.
showTree
(
0
);
})
})
.
delay
(
1
)
.
delay
(
1
)
...
@@ -162,17 +166,34 @@ cc.Class({
...
@@ -162,17 +166,34 @@ cc.Class({
},
},
async
showTree
(
idx
)
{
async
showTree
(
idx
)
{
if
(
idx
<=
this
.
_status
.
treeHeight
||
idx
>=
this
.
_maxTreeHeight
)
{
if
(
idx
<=
this
.
_status
.
treeHeight
||
this
.
data
.
wordList
.
length
<=
idx
)
{
return
;
return
;
}
}
const
treeYList
=
[
500
,
700
,
900
,
1100
,
1300
];
const
nodeTree
=
cc
.
find
(
'
Canvas/NodeBg/TreeMaskNode/NodeTree
'
);
const
nodeTree
=
cc
.
find
(
'
Canvas/NodeBg/TreeMaskNode/NodeTree
'
);
this
.
moveCamera
(
idx
);
this
.
playEffect
(
'
植物
'
);
await
asyncTweenTo
(
nodeTree
,
3
,
{
y
:
treeYList
[
idx
]
});
this
.
_status
.
treeHeight
=
idx
;
this
.
growTree
(
idx
);
this
.
growSky
(
idx
);
await
asyncTweenTo
(
nodeTree
,
3
,
{
y
:
500
+
200
*
idx
});
this
.
playEffect
(
'
路牌
'
);
this
.
playEffect
(
'
路牌
'
);
this
.
showShell
(
idx
);
this
.
showShell
(
idx
);
this
.
_status
.
treeHeight
=
idx
;
},
growTree
(
idx
)
{
if
(
idx
<
5
)
{
return
;
}
const
nodeTree
=
cc
.
find
(
'
Canvas/NodeBg/TreeMaskNode/NodeTree
'
);
asyncTweenTo
(
nodeTree
,
3
,
{
scaleY
:
(
nodeTree
.
height
+
200
*
(
idx
-
4
))
/
nodeTree
.
height
});
},
growSky
(
idx
)
{
if
(
idx
<
5
)
{
return
;
}
const
nodeBg
=
cc
.
find
(
'
Canvas/NodeBg
'
);
asyncTweenTo
(
nodeBg
,
3
,
{
height
:
(
nodeBg
.
height
+
200
*
(
idx
-
4
))
});
},
},
moveCamera
(
idx
)
{
moveCamera
(
idx
)
{
...
@@ -182,10 +203,13 @@ cc.Class({
...
@@ -182,10 +203,13 @@ cc.Class({
},
},
showShell
(
idx
)
{
showShell
(
idx
)
{
const
nodeShell
=
cc
.
find
(
`Canvas/NodeBg/TreeMaskNode/NodeShell_
${
idx
}
`
);
const
nodeShell
=
cc
.
instantiate
(
this
.
shellPrefab
);
const
btnChange
=
cc
.
find
(
`Canvas/NodeBg/TreeMaskNode/NodeShell_
${
idx
}
/BtnChange`
);
nodeShell
.
parent
=
cc
.
find
(
'
Canvas/NodeBg/TreeMaskNode
'
);
const
labelNode
=
cc
.
find
(
`Canvas/NodeBg/TreeMaskNode/NodeShell_
${
idx
}
/LabelNode`
);
nodeShell
.
y
=
idx
*
200
+
300
;
const
labelNodeBack
=
cc
.
find
(
`Canvas/NodeBg/TreeMaskNode/NodeShell_
${
idx
}
/LabelNodeBack`
);
const
btnChange
=
nodeShell
.
getChildByName
(
'
BtnChange
'
);
const
labelNode
=
nodeShell
.
getChildByName
(
'
LabelNode
'
);
const
labelNodeBack
=
nodeShell
.
getChildByName
(
'
LabelNodeBack
'
);
btnChange
.
on
(
'
click
'
,
()
=>
{
btnChange
.
on
(
'
click
'
,
()
=>
{
cc
.
tween
(
nodeShell
)
cc
.
tween
(
nodeShell
)
...
@@ -207,7 +231,6 @@ cc.Class({
...
@@ -207,7 +231,6 @@ cc.Class({
labelNode
.
on
(
'
click
'
,
()
=>
{
labelNode
.
on
(
'
click
'
,
()
=>
{
asyncPlayEffectByUrl
(
this
.
data
.
wordList
[
idx
].
audio
);
asyncPlayEffectByUrl
(
this
.
data
.
wordList
[
idx
].
audio
);
if
(
this
.
data
.
wordList
[
idx
].
backWord
==
''
)
{
if
(
this
.
data
.
wordList
[
idx
].
backWord
==
''
)
{
this
.
playEffect
(
'
植物
'
);
this
.
showTree
(
idx
+
1
);
this
.
showTree
(
idx
+
1
);
return
;
return
;
}
}
...
@@ -281,7 +304,7 @@ cc.Class({
...
@@ -281,7 +304,7 @@ cc.Class({
const
targetPosList
=
[]
const
targetPosList
=
[]
for
(
let
i
=
1
;
i
<
5
;
i
++
)
{
for
(
let
i
=
1
;
i
<
5
;
i
++
)
{
const
node
=
cc
.
find
(
`Canvas/NodeBg/NodePosBase/NodeFishPos_
${
i
}
`
);
const
node
=
cc
.
find
(
`Canvas/NodeBg/NodePosBase/NodeFishPos_
${
i
}
`
);
targetPosList
.
push
({
x
:
node
.
x
,
y
:
node
.
y
});
targetPosList
.
push
({
x
:
node
.
x
,
y
:
node
.
y
+
720
});
}
}
const
nodeBg
=
cc
.
find
(
'
Canvas/NodeBg
'
);
const
nodeBg
=
cc
.
find
(
'
Canvas/NodeBg
'
);
...
@@ -297,7 +320,7 @@ cc.Class({
...
@@ -297,7 +320,7 @@ cc.Class({
const
fish
=
cc
.
instantiate
(
this
.
fishPrefab
);
const
fish
=
cc
.
instantiate
(
this
.
fishPrefab
);
fish
.
parent
=
nodeBg
;
fish
.
parent
=
nodeBg
;
fish
.
x
=
-
1000
+
offsetX
;
fish
.
x
=
-
1000
+
offsetX
;
fish
.
y
=
40
0
+
offsetY
;
fish
.
y
=
102
0
+
offsetY
;
fish
.
scaleX
=
fishScle
+
Math
.
random
()
*
0.3
;
fish
.
scaleX
=
fishScle
+
Math
.
random
()
*
0.3
;
fish
.
scaleY
=
fishScle
+
Math
.
random
()
*
0.3
;
fish
.
scaleY
=
fishScle
+
Math
.
random
()
*
0.3
;
...
...
play/assets/z_04_syys/script/defaultData.js
View file @
786a9bc9
...
@@ -19,6 +19,21 @@ module.exports = {
...
@@ -19,6 +19,21 @@ module.exports = {
audio
:
'
ee.mp3
'
,
audio
:
'
ee.mp3
'
,
backWord
:
''
,
backWord
:
''
,
backWordAudio
:
''
,
backWordAudio
:
''
,
},
{
word
:
'
ee
'
,
audio
:
'
ee.mp3
'
,
backWord
:
''
,
backWordAudio
:
''
,
},
{
word
:
'
ee
'
,
audio
:
'
ee.mp3
'
,
backWord
:
''
,
backWordAudio
:
''
,
},
{
word
:
'
ee
'
,
audio
:
'
ee.mp3
'
,
backWord
:
''
,
backWordAudio
:
''
,
},
{
},
{
word
:
'
ea
'
,
word
:
'
ea
'
,
audio
:
'
ea.mp3
'
,
audio
:
'
ea.mp3
'
,
...
...
play/assets/z_04_syys/textures/bg_bg.png.meta
View file @
786a9bc9
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
"height": 1440,
"height": 1440,
"rawWidth": 1280,
"rawWidth": 1280,
"rawHeight": 1440,
"rawHeight": 1440,
"borderTop":
0
,
"borderTop":
45
,
"borderBottom":
0
,
"borderBottom":
1336
,
"borderLeft": 0,
"borderLeft": 0,
"borderRight": 0,
"borderRight": 0,
"subMetas": {}
"subMetas": {}
...
...
play/assets/z_04_syys/textures/bg_tree.png.meta
View file @
786a9bc9
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
"height": 1224,
"height": 1224,
"rawWidth": 127,
"rawWidth": 127,
"rawHeight": 1224,
"rawHeight": 1224,
"borderTop":
0
,
"borderTop":
899
,
"borderBottom":
0
,
"borderBottom":
316
,
"borderLeft": 0,
"borderLeft": 0,
"borderRight": 0,
"borderRight": 0,
"subMetas": {}
"subMetas": {}
...
...
play/settings/builder.json
0 → 100644
View file @
786a9bc9
{
"title"
:
"play"
,
"packageName"
:
"org.cocos2d.demo"
,
"startScene"
:
"95683576-d267-4b91-91b5-d4938a156943"
,
"excludeScenes"
:
[],
"includeSDKBox"
:
false
,
"orientation"
:
{
"landscapeLeft"
:
true
,
"landscapeRight"
:
true
,
"portrait"
:
false
,
"upsideDown"
:
false
},
"webOrientation"
:
"auto"
,
"inlineSpriteFrames"
:
false
,
"inlineSpriteFrames_native"
:
true
,
"mainCompressionType"
:
"default"
,
"mainIsRemote"
:
false
,
"optimizeHotUpdate"
:
false
,
"md5Cache"
:
false
,
"nativeMd5Cache"
:
true
,
"encryptJs"
:
true
,
"xxteaKey"
:
"3870a9ca-a3da-4d"
,
"zipCompressJs"
:
true
,
"fb-instant-games"
:
{},
"android"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"packageName"
:
"org.cocos2d.demo"
},
"ios"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"packageName"
:
"org.cocos2d.demo"
},
"mac"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"height"
:
720
,
"packageName"
:
"org.cocos2d.demo"
,
"width"
:
1280
},
"win32"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"height"
:
720
,
"width"
:
1280
},
"android-instant"
:
{
"REMOTE_SERVER_ROOT"
:
""
,
"host"
:
""
,
"packageName"
:
"org.cocos2d.demo"
,
"pathPattern"
:
""
,
"recordPath"
:
""
,
"scheme"
:
"https"
,
"skipRecord"
:
false
},
"appBundle"
:
false
}
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