Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chooseWord
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
chooseWord
Commits
87c4450b
Commit
87c4450b
authored
Dec 01, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
火车初始位置
parent
086a6167
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
LayerResult.prefab
play/assets/tmpGame/prefabs/LayerResult.prefab
+7
-7
LayerResult.js
play/assets/tmpGame/script/LayerResult.js
+16
-0
Scene.js
play/assets/tmpGame/script/Scene.js
+1
-1
No files found.
play/assets/tmpGame/prefabs/LayerResult.prefab
View file @
87c4450b
...
@@ -259,8 +259,8 @@
...
@@ -259,8 +259,8 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 0,
"width":
110
0,
"height":
0
"height":
646
},
},
"_anchorPoint": {
"_anchorPoint": {
"__type__": "cc.Vec2",
"__type__": "cc.Vec2",
...
@@ -311,11 +311,11 @@
...
@@ -311,11 +311,11 @@
],
],
"_armatureName": "",
"_armatureName": "",
"_animationName": "",
"_animationName": "",
"_preCacheMode":
-1
,
"_preCacheMode":
0
,
"_cacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"playTimes": -1,
"premultipliedAlpha": false,
"premultipliedAlpha": false,
"_armatureKey": "",
"_armatureKey": "
179808f9-d84c-4a2b-a3c1-5d3c5d002992#e3095326-81fc-4cbf-8810-a4ee76c30843
",
"_accTime": 0,
"_accTime": 0,
"_playCount": 0,
"_playCount": 0,
"_frameCache": null,
"_frameCache": null,
...
@@ -370,7 +370,7 @@
...
@@ -370,7 +370,7 @@
},
},
"_contentSize": {
"_contentSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
96.52
,
"width": 1
5.35
,
"height": 100
"height": 100
},
},
"_anchorPoint": {
"_anchorPoint": {
...
@@ -417,7 +417,7 @@
...
@@ -417,7 +417,7 @@
"_enabled": true,
"_enabled": true,
"_layoutSize": {
"_layoutSize": {
"__type__": "cc.Size",
"__type__": "cc.Size",
"width": 1
96.52
,
"width": 1
5.35
,
"height": 100
"height": 100
},
},
"_resize": 1,
"_resize": 1,
...
@@ -668,7 +668,7 @@
...
@@ -668,7 +668,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
0,
0,
-1
60.545
,
-1
80.484
,
0,
0,
0,
0,
0,
0,
...
...
play/assets/tmpGame/script/LayerResult.js
View file @
87c4450b
...
@@ -63,6 +63,8 @@ cc.Class({
...
@@ -63,6 +63,8 @@ cc.Class({
}
}
this
.
dragonBone
.
armatureName
=
data
.
name
;
this
.
dragonBone
.
armatureName
=
data
.
name
;
this
.
animationName
=
data
.
animation
[
0
].
name
;
this
.
animationName
=
data
.
animation
[
0
].
name
;
this
.
setSpineScale
(
data
.
canvas
);
}
}
});
});
}
}
...
@@ -70,6 +72,20 @@ cc.Class({
...
@@ -70,6 +72,20 @@ cc.Class({
},
},
setSpineScale
(
size
)
{
let
bgWidth
=
250
;
let
bgHeight
=
250
;
if
(
size
.
width
!=
bgWidth
||
size
.
height
!=
bgHeight
)
{
let
designScale
=
bgWidth
/
bgHeight
;
let
scale
=
size
.
width
/
size
.
height
;
if
(
scale
>
designScale
)
{
this
.
dragonBone
.
node
.
scale
=
bgWidth
/
size
.
width
;
}
else
{
this
.
dragonBone
.
node
.
scale
=
bgHeight
/
size
.
height
;
}
}
},
initLetters
()
{
initLetters
()
{
let
text
=
this
.
item
.
text
;
let
text
=
this
.
item
.
text
;
for
(
let
i
=
0
;
i
<
text
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
text
.
length
;
i
++
)
{
...
...
play/assets/tmpGame/script/Scene.js
View file @
87c4450b
...
@@ -224,7 +224,7 @@ cc.Class({
...
@@ -224,7 +224,7 @@ cc.Class({
},
},
initLayerTrainPosition
()
{
initLayerTrainPosition
()
{
this
.
layerTrain
.
x
=
cc
.
view
.
getVisibleSize
().
width
/
2
-
12
2
0
;
this
.
layerTrain
.
x
=
cc
.
view
.
getVisibleSize
().
width
/
2
-
12
8
0
;
this
.
dragonBone
.
playAnimation
(
'
normal
'
,
-
1
);
this
.
dragonBone
.
playAnimation
(
'
normal
'
,
-
1
);
},
},
...
...
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